biolab-unige / xtens-app

A digital repository for biomedical data based on a flexible JSON data model ( The project has been moved to a new address https://github.com/xtens-suite/xtens-app.git )
http://www.xtens.org
BSD 3-Clause "New" or "Revised" License
6 stars 1 forks source link

Modifing data, date change #10

Closed gicaz closed 8 years ago

gicaz commented 8 years ago

When i modify or create any type of data, date keeps changing. Example: Date inserted: 1975-05-11 Date displayed by postgres: 1975-05-11 Date returned by node's pg: 1975-05-10T23:00:00.000Z

Zigur commented 8 years ago

Not sure about what you mean by this

When you convert the ISO string 1975-05-11 to a JavaScript date it becomes 1975-05-11T00:00:00CET which is exactly 1975-05-10T23:00:00.000Z (zulu time is equivalent to GMT or UTC, while CET is GMT+1). So the date itself is correct, it should not be represented "as its is"