Closed
Description
I have declared a date column in Postgres as date.
When I write the value with node's pg module, the Postgres Tool pgAdmin displays it correctly.
When I read the value back using pg, Instead of plain date, a date-time string comes with wrong day.
e.g.:
Date inserted: 1975-05-11
Date displayed by pgAdmin: 1975-05-11
Date returned by node's pg: 1975-05-10T23:00:00.000Z
The error seems to be due to the different handling of time-zone during parsing from string and converting the Date-object back to string.
I hope this post may help: SO
Metadata
Metadata
Assignees
Labels
No labels