Closed simongray closed 2 years ago
So this issue indeed seems to be related to time zones. However, the issue does not appear in production.
I speculate that it is due to the fact that the my local system reads in the dates using a Denmark timezone while the production server uses UTC (the parsing happens via dk.cst.glossematics.shared/parse-date
.
When displayed in the frontend UI, UTC is always shown since the code currently in use calls .toISOString
on the inst
which always displays the UTC date. So in production—since UTC was always used—the date displays correctly, while in dev the date is shifted back 1 hour since it is "converted" from Denmark TZ to UTC at this final step.
E.g. 1939-11-24 becomes 1939-11-23 in http://localhost:8080/app/reader/24.11.1939-LH-Holt-tei-final.xml
This probably has something to do with time zones.