Iso8601 format
spmenard opened this issue · comments
Stephane Menard commented
Hi,
the format of you datetime is that way "2013-01-01T00:00:00 UTC" and the standard iso8601 is a bit different : 2014-03-18T21:29:15Z or 2014-03-18T21:29:15+00:00, is there a way to modify the toString function ?
Jacob Quinn commented
Yeah, we should probably change this to the 2014-03-18T21:28:15+00:00
format.
Jacob Quinn commented
I'm going to leave this as is for now. The Base version now prints as yyyy-mm-ddTHH:MM:SS
, but has the more sophisticated Dates.format(t,format_string)
function that allows you to achieve custom strings
In [8]: t = DateTime(2014)
Out [8]: 2014-01-01T00:00:00
In [9]: Dates.format(t,"yyyy-mm-ddTHH:MM:SSZ")
Out [9]: "2014-01-01T00:00:00Z"
In [10]: Dates.format(t,"yyyy-mm-ddTHH:MM:SS+00:00")
Out [10]: "2014-01-01T00:00:00+00:00"