Wednesday, 15 July 2015

javascript - Does UTC date string require the format specifier "Z" even if that string includes time offset? -



javascript - Does UTC date string require the format specifier "Z" even if that string includes time offset? -

for instance,

date d = "2012-08-20t15:00:00-07:00";

d here utc time time offset = 07:00. still require z 2012-08-20t15:00:00-07:00z? correct?

if take string z , pase using date.parse() method in javascript, throws error. not sure wrong!

no, should not include "z" time zone offset.

from rfc3339:

z suffix which, when applied time, denotes utc offset of 00:00; spoken "zulu" icao phonetic alphabet representation of letter "z".

the "z" 0 time offset, including explicit offset (especially non-zero one) doesn't makes sense.

javascript parsing date utc

No comments:

Post a Comment