Search Postgresql Archives

timezone() with timeofday() converts the wrong direction?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



These attempts were run at 4/21/2005 13:15:00 -07.
UTC: 4/21/2005 20:15:00

SELECT timeofday()::timestamp
04/21/2005 13:15:00

SELECT timezone('UTC', now())
04/21/2005 20:15:00 PM

SELECT timezone('UTC', timeofday()::timestamp)::timestamp without time zone
04/21/2005 06:15:00 <- What the heck is this?!


Why does the conversion to UTC using timeofday() go wrong? It seems like the
conversion went 7 hours in the wrong direction. Did I forget a parameter or
switch somewhere?

Thanks,
Steve



---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@xxxxxxxxxxxxxx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux