Skip to content

parseInputDatesAsUTC is not documented #2141

Open
@djmitche

Description

@djmitche

Per #783, #1746, and a few other TZ-related issues, it seems that node-postgres interprets JS Date objects as in the local timezone, unless pg.defaults.parseInputDatesAsUTC is true.

This behavior is, I think, surprising for those of us building server software, where using UTC everywhere is a general best practice. It's even more surprising since the behavior depends on the local system timezone, so only appears when tests are run on a non-UTC system, meaning tests will pass in CI and fail on development systems.

It would be great if this behavior, and the default, was documented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions