1166Re: [json] timedate format
- Sep 4, 2008Vlad scripsit:
> Are there any best practices or suggestions among JSON implementers onTimestamps are in my opinion too trivial to be worth structuring.
> a structured way to pass timedate data?
The fixed string format of RFC 3339 are not burdensome to parse: they look
like "2008-09-04T11:41:00-04:00", meaning September 4th, 2009 at 11:41,
with an offset from Universal Time of negative 4 hours zero minutes.
The "T" is a fixed separator (it can also be "t") between the date and
the time. If you are using Universal Time (also called UTC and GMT)
in all cases (which I recommend), you may replace "+00:00" with "Z".
The only other option is that if the timestamp has sub-second precision,
the normal two digits of the seconds field may be supplemented by a
decimal point and as many more digits as you need.
John Cowan cowan@... http://ccil.org/~cowan
I am he that buries his friends alive and drowns them and draws them
alive again from the water. I came from the end of a bag, but no bag
went over me. I am the friend of bears and the guest of eagles. I am
Ringwinner and Luckwearer; and I am Barrel-rider. --Bilbo to Smaug
- << Previous post in topic Next post in topic >>