Problem with timezones
Hi,
I've created a table with a column 'utc time with time zone' and then
INSERT '0:00:00 XXX' where XXX is the tiemzone.
In the table are all timezones and if I select with
SELECT (timezone_hour FROM utc) FROM timezones;
PostGreSQL return all timeszones with sign (example for IDLW it should
be -12; 12 is returned).
Is this a bug or is this me mistake?
I've PostGreSQL Version 7.3.2 running on a Mac OS X 10.2 (G3).
Thanks for help.
Kay-Uwe Genz
Kay-Uwe Genz <kug1977@web.de> writes:
Is this a bug or is this me mistake?
Yours I think. Type TIME WITH TIME ZONE stores a time of day
(from 00:00:00 to 23:59:59) plus a time zone (some offset east
or west of Greenwich --- I think we allow up to plus or minus
13 hours). I see nothing in the concept that would allow for
a negative local-time-of-day.
If you need a signed time-like datatype, maybe INTERVAL is closer
to what you're looking for.
regards, tom lane