Closed
Description
rust-postgres currently sets timezone
to GMT
on startup. Recently, I was bitten by this behavior because I assumed it to be my local timezone. It seems that the GMT forcing is done to have an interoperability with the underlying time
crate. So I wondered:
- Would that be possible to remove that limitation? The official driver (libpq) doesn't have such a behavior, so it can be a bit confusing (to me, at least). However, I get that defaulting to GMT is almost always a good idea, though.
- Is it safe to
SET timezone to [local timezone]
manually? If the concern with thetime
crate still holds, it may break some assertions that theTimespec
values are stored in GMT.