jason_priebe(at)yahoo(dot)com (Jason Priebe) writes:
> foo=> select cast(timeofday() as timestamp with time zone); set time
> zone 'GMT+4'; select cast(timeofday() as timestamp with time zone);
This breaks because localtime() is broken: it returns the string "GMT"
as the time zone. You can see the problem without any reference to
Postgres:
$ date
Wed Aug 13 16:09:56 EDT 2003
$ TZ='GMT+4' date
Wed Aug 13 16:09:57 GMT 2003
$
My advice: don't specify the time zone like that. Use 'EST5EDT' or some
other standard timezone specifier. Or avoid timeofday() ... now() or
current_timestamp would be better choices anyway ...
regards, tom lane