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

Wrong data shown when editing patients #16

Closed Zigur closed 8 years ago

Zigur commented 8 years ago

@gicaz: can you verify if this is the case? (maybe in your installation)?

This is the relevant line to debug, I think: https://github.com/biolab-unige/xtens-app/blob/993bd01923c9eced066253598561713ed8fffa5a/assets/js/modules/PersonalDetails.js#L41

A date as 17 January 2003 should be saved as: 1) 2003-01-17 in the database 2) 2003-01-16T23:00:00.000Z as a JavaScript formatted date string in zulu time/UTC/GMT 3) 17/01/2003 when displayed according to the Italian Time Zone (using moment)

Zigur commented 8 years ago

@gicaz The error is here: https://github.com/biolab-unige/xtens-app/blob/993bd01923c9eced066253598561713ed8fffa5a/views/templates/subject-details.ejs#L30

The date is not displayed using moment