tminglei / slick-pg

Slick extensions for PostgreSQL
BSD 2-Clause "Simplified" License
838 stars 180 forks source link

regression: OffsetDateTime returns results in UTC instead of the local timezone #355

Open kwark opened 7 years ago

kwark commented 7 years ago

The refactoring done to PgDate2 support causes a regression when reading OffsetDateTime values from the database.

In older releases, you would store f.e. an OffsetDateTime with value "2001-01-03 13:21:00.102203+08" and upon reading it back would get exactly the same value back. The reading from the database took into account the 'default' timezone of the application.

In release 0.15.1 you now get back "2001-01-03T05:21:00.102203Z". Technically it is the same but it is very inconvenient: the application now has to convert it to its own 'default' timezone.

tminglei commented 7 years ago

Merged it. Thanks! 👍