I can create a JavaScript date object using:
var d=new Date('2012-08-07T07:47:46Z');
document.write(d);
This will record the date using the browser time zone. But I have to be able to (no "Z"):
var d=new Date('2012-08-07T07:47:46');
document.write(d);
Returns the same as above, but in accordance with the ISO8601 standard, a string without a time zone (for example, +01: 00) and without a "Z", the date should be considered in the local time zone. So, the second example above should write a date-time as 7:47 a.m.
I get the datetime string from the server, and I want to display exactly that datetime. Any ideas?
source
share