-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parsing TIMESTAMP WITHOUT TIME ZONE as local time #1071
Comments
i also got this problem |
See this issue for more info on this #818 |
There's a reason for this - it comes up about once a year in an issue here and on node-pg-types - basically the tl;dr is we bike shedded on this hard a few years ago & came up with this being the right solution, but the details are in issue #818. (thanks for pointing that out @jondayft!) The good news is you can override the behavior very easily in |
I actually wasn't able to find any reasons why timestamp without timezone is parsed to local time and not to UTC from #818 (this comes up every now and then in knex issues). Sounds like it was an old decision maybe because when you pass Date object as an input and then read it with query and parse it back to Date object, the date value remains the same. Also postgresql spec seems agree that timestamp without timezone is local timestamp
https://www.postgresql.org/docs/9.2/static/datatype-datetime.html |
When I get a return of a TIMESTAMP WITHOUT TIME ZONE I get it in local time instead of in UTC like it was stored(hence no time zone). Is there a reason for this or should it be addressed?
The text was updated successfully, but these errors were encountered: