What's a quick and easy way to correct the time zone TIMESTAMP WITH TIME ZONE
fields accidentally entered in the wrong time zone?
In my case, the following records were mistakenly input in UTC rather than in US/Pacific:
t0 | t1 | what
------------------------+------------------------+---------------
2011-06-01 13:00:00+00 | 2011-06-01 13:10:00+00 | recalibrating
2011-06-01 13:10:00+00 | 2011-06-01 13:45:00+00 | verifying
2011-06-01 13:45:00+00 | 2011-06-01 13:55:00+00 | FAULT
Fortunately, none of the mistaken records cross daylight savings boundaries, so 2 o'clock UTC can simply be corrected as 2 o'clock Pacific.
There are casts and, more importantly, the
at time zone
operator, which are useful for this kind of thing, e.g.: