I have a hosted web application that generates reports based on daily end of business day data. With the server located in Europe (set to use UTC time), me located in Asia (UTC+5) and my boss and peers located in the US (UTC-5), we seem to have a problem getting the same dates.
For example, the report on my side shows “July 23, 2012” while in the US it shows “July 22, 2012”. I checked on the server using RDP, and it shows “July 23, 2012” as well.
There’s no localization within my app. I’m not sure if this is ASP.NET, client-side JavaScript or MySql that’s changing the dates based on where the request originates from? Any ideas?
Edit
Just checked with my boss, the source within his browser shows “2012-07-23” as well. So I suppose that narrows it down to JavaScript changing the dates when new Date("2012-07-23") is called.
If your using ISO Datetime please make sure you specify a timezone on the end, otherwise it’s counted as local time.
If possible when using databases and ASP.NET applications use UTC time for everything.
If your specifying dates for use, then use ISO dates whenever possible to cut down on cultural invariances.