On 7/20/2015 6:08 PM, Jay Kominek wrote:
You might be ending up with different timezones set on the different
connections, as libpq clients can automatically set/change some
session settings that the racket library does not. I'd try running
"show timezone" via both connections, and see what you end up with.
Hi Jay,
I think you hit the nail on the head. Somewhere I am setting the
timestamp in UTC and somehow reading it back in local time. I think I
was confused because the PG docs say *current_date* always produces time
= 00:00:00 when coerced to a timestamp ... but I glossed over that the
docs were using timestamp _without_ time zone. After a bit of
experimenting, it appears that if a date is coerced to 'timestamp with
time zone', the hour is adjusted so the time only reads 00:00:00 if you
write and read back using the same time zone setting.
I am using a connection pool, but I /thought/ I was executing /*set
session time zone 0*/ (for UTC) on every connection before using it.
Thanks for pointing me in the right direction.
George
--
You received this message because you are subscribed to the Google Groups "Racket
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.