Fork me on GitHub
#sql
<
2017-03-14
>
yogidevbear08:03:12

We've experienced similar issues with JavaScript playing up with .getDate() and .getTime() functions. As standard, we store everything as UTC in the database and then use .getUTCDate() and .getUTCTime() to ensure consistency, but YMMV depending on your location and use case

yogidevbear08:03:06

Actually, thinking back on the issue, it was more the display offsetting the day/month/year value displayed to users in different time zones

yogidevbear08:03:55

We had to swap out all the .getDate(), .getMonth() and .getYear() JavaScript functions with the .getUTC....() equivalent functions. Just mentioning as it may be relevant further down the line