"TIMESTAMP and TIME may also be specified as being WITH TIME ZONE, in which case every value has associated with it a time zone displacement. In comparing values of a data type WITH TIME ZONE, the value of the time zone displacement is disregarded." Well what's the point then?
The long version of how the spec defines timezones is: a "timezone" is actually just a UTC offset. There are no zone names, DST boundaries, historical zone changes etc. A timestamp with time zone is a UTC timestamp and an offset.
-
-
Further, the spec says that if a timestamp without time zone is converted to with time zone, the offset used is the session's /current/ UTC offset. If the original timestamp was the other side of a DST boundary: tough, you get the wrong answer.
-
Not to mention that timezones are an optional feature in the first place, so clients can't rely on them. Is it any wonder that "store everything in UTC without time zones" is the standard advice outside the
@PostgreSQL world? - 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.