-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
While retrieving Timestamp values from DB it is adding 4 hours to it. #2525
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
Comments
See #2390 (comment). If your column represents moments in time, though – it sounds like it does – it should probably be a |
|
I have tried both with timestamp and timestamptz datatype. Same issue. So as a work around I am using varchar as datatype for datetime fields. |
If the same thing is happening with |
See my comment here #2530 (comment) |
For anyone else having trouble - You're probably testing locally and it's picking up your local timezone from NodeJS. |
Another way to "fix" this is to set:
which makes it assume that all your DB timestamps are in UTC time, as far as I understand. |
Hi,
I am using "pg" in one of my nodeapp. The timestamp values i insert programmatically is inserting correct time. However while retrieving the same via pool.query, it is adding 4 hours to it. How to address this?
File1 is from DB & File2 id while retrieving.


Appreciate any feedback suggestion.
The text was updated successfully, but these errors were encountered: