Skip to content

More flexible timezone configuration #147

Closed
@barosl

Description

@barosl

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:

  1. 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.
  2. Is it safe to SET timezone to [local timezone] manually? If the concern with the time crate still holds, it may break some assertions that the Timespec values are stored in GMT.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions