In the SQL database, I have a list of times from different time zones, but I don't have and don't care about the relevant time zone information:
2012-01-01 01:02:03 2012-07-01 04:05:06
For output, I would like to format them using Javascript. I tried:
var text = input.replace(' ','T');
The problem is that in Chrome, the date is interpreted as being in UTC and converted to my local timezone, so I get:
2 6
while in Firefox it is interpreted as local time, and I get what I want:
1 4
So, is there a better solution with a Date object, or am I stuck in line splitting?
source share