BUG #2304: Time zone bug: '05:04 GMT+3' processing as '05:04:00 -03'

Started by Alexander Pivovarovabout 20 years ago2 messagesbugs
Jump to latest
#1Alexander Pivovarov
apivovarov@gmail.com

The following bug has been logged online:

Bug reference: 2304
Logged by: Alexander Pivovarov
Email address: apivovarov@gmail.com
PostgreSQL version: 8.1.3
Operating system: FreeBSD 6.1
Description: Time zone bug: '05:04 GMT+3' processing as '05:04:00
-03'
Details:

# select '05:04 GMT+3'::time with time zone;
timetz
-------------
05:04:00-03
(1 row)

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alexander Pivovarov (#1)
Re: BUG #2304: Time zone bug: '05:04 GMT+3' processing as '05:04:00 -03'

"Alexander Pivovarov" <apivovarov@gmail.com> writes:

# select '05:04 GMT+3'::time with time zone;
timetz
-------------
05:04:00-03
(1 row)

This isn't a bug; it's expected. The "GMT+n" syntax is defined by a
different standard than the one we follow for timestamp output, and
the two standards don't agree about sign. It's unfortunate but there's
not a lot we can do about it.

regards, tom lane