rakenduste-programmeerimine-2022 / minigamer

0 stars 0 forks source link

Solve date issues #80

Closed taavippp closed 1 year ago

taavippp commented 1 year ago

I found out that saving dates to the database as "YYYY-MM-DD" javascript-style (november would be month 10 in JS) was causing MongoDB to read it as a date in October (the actual 10th month).

taavippp commented 1 year ago

For some reason, with the fix(?), trying to save at 00:00 of 25/11/2022 (just an example date), causes it to be actually saved at 22:00 of 24/11/2022. Probably caused by the local build trying to offset my computer's timezone. I don't think it'll be an issue in production since the database doesn't save any user input dates.