Skip to content

Library is converting my datetime string to UTC #1746

Closed as not planned
Closed as not planned
@andrewackerman

Description

@andrewackerman

I'm working on a DB that was converted from MySQL to Postgres using a migration script. While converting the database interactions from mysql to node-postgres, I noticed that my test SQL queries were not being stored correctly - all my datetimes that were being input as ISO-8601 formatted strings with an explicit UTC flag ("YYYY-MM-DDThh:mm:ss.sssZ") were getting treated as though they were local timestamps and being implicitly converted to the "correct" UTC timezone.

There doesn't appear to be any official way to override this behavior, and as such it is seriously getting in the way of my conversion. I tried changing the datetime strings to signify UTC using the timezone-offset format ("YYYY-MM-DDThh:mm:ss.sss+00:00"), but it made no difference.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions