I’m using the jQuery Weekly Calendar plugin (https://github.com/robmonie/jquery-week-calendar/wiki/). When I alert the startTime and endTime (which also go in a database), I get different results on Mac and Windows.
Chrome on Mac shows the time as:
Sat Nov 26 2011 13:10:00 GMT-0700 (MST)
Where as Chrome on Windows shows the time as:
Sat Nov 26 2011 13:10:00 GMT-0700 (Mountain Standard Time)
Any ideas why that would be happening? In the jQuery Weekly Calendar script, I was thinking maybe these lines need to be changed somehow:
$timestampsOfOptions.start[timeslotTimes[i].startFormatted] = startTime.getTime();
$timestampsOfOptions.end[timeslotTimes[i].endFormatted] = endTime.getTime();
But I’m not really sure to be honest.
getTime()isn’t what needs to be changed — it returns a numeric value.The output you’re looking at looks like the raw output from JavaScript’s native
Date.toString()method, whose output is not guaranteed to be in any specific format. In particular, the names of time zones are often not the same from system to system — if you need consistent output, you’re probably out of luck.