ISO/JSON date format timezone questions

doekman at gmail.com doekman at gmail.com
Fri Jul 13 14:52:36 PDT 2007


Hi,
I was wondering about two things involving timezones.

The proposal "Date and time improvements" is defining the
Date.toISO():String method.

It's unclear to me in what timezone the date should
be serialized in: local timezone or UTC. Although it's semantically
correct to allow both and let the implementors decide, but I think
that would be "not a good thing".

I prefer is to be serialized in UTC (with the Z suffix). The
downside of this is, all json users will have to support time-zones.
The advantage is, you can truncate two arbitrary json-date strings,
and compare them, even if the dates are serialized in different
timezones.

The other question is concerning the "JSON encoding and decoding"
proposal. Is the Date serialization using the (fixed) formatting
of www.json.org/json.js, or is it using the toISO method,
mentioned above?
-- 
|\
| \
|_/oeke
doekman at gmail.com



More information about the Es4-discuss mailing list