lukehoersten · GitHub

The timezones CDT and EST are both -5 offsets from UTC. When serializing ZonedTimes timezones as an offset, the original timezone is lost. It looks like this is what's being done in postgresql-simple:

timeZoneToBuilder :: TimeZone -> Builder

It looks like deserialization has the same problem.

This has some practical problems. For example:
I'm currently in CDT (daylight savings) so when I store a ZonedTime of the current time and then pull it back out of postgresql-simple, it's been shifted by an hour.

I'm also making the assumption that PGSQL actually stores the full timezone info (it looks like it does in the docs):
http://www.postgresql.org/docs/9.2/static/datatype-datetime.html

Read the original on github.com ↗