
Hi Andre
Wow! you are thorough! :-) Thanks!
Unfortuntely I wasn't thorough enough, I didn't include xsd:DateTime which is what much of the underlying middleware will be using. For a description of the issues related to timestamps and standards check out the following thread on the Atom mailing list: http://www.imc.org/atom-syntax/mail-archive/msg13103.html I think the solution that the Atom people came up with is a good compromise as it is complient with xsd:DateTime, ISO 8601, RFC 3339 and the W3C profile of ISO 8601:
3.3. Date Constructs A Date construct is an element whose content MUST conform to the "date-time" production in [RFC3339]. In addition, an uppercase "T" character MUST be used to separate date and time, and an uppercase "Z" character MUST be present in the absence of a numeric time zone offset. atomDateConstruct = atomCommonAttributes, xsd:dateTime Such date values happen to be compatible with the following specifications: [ISO.8601.1988], [W3C.NOTE-datetime-19980827], and [W3C.REC-xmlschema-2-20041028]. Example Date constructs: <updated>2003-12-13T18:30:02Z</updated> <updated>2003-12-13T18:30:02.25Z</updated> <updated>2003-12-13T18:30:02+01:00</updated> <updated>2003-12-13T18:30:02.25+01:00</updated> Date values SHOULD be as accurate as possible. For example, it would be generally inappropriate for a publishing system to apply the same timestamp to several entries that were published during the course of a single day. <<< The above is from RFC 4287, http://www.ietf.org/rfc/rfc4287.txt I am not fully clued up on what SAGA is doing but you could include a helper function that would convert the above DateTime into seconds from the epoch. cheers Mark
Seems that w3 has a similar convention as the ISO standard Chris referred to.
Well, what was that famous quote again: "The nice thing about standards is that there are so many to choose from" ;-)
Do you, or Chris, or others, have any opinion which version we should use?
I personally think that the ISO and W3 one are not looking particularily beautiful, with T (!) as a delimiter, but they are surely simple enough to parse...
On the other we try to stay close to POSIX in many places, so sticking with ctime, or even seconds since epoch, would also be well justified...
Cheers, Andre.
Quoting [Mark.McKeown@manchester.ac.uk] (May 17 2006):
The W3C has a profile of ISO 8601 which simplifies life:
http://www.w3.org/TR/NOTE-datetime
Also IETF have a RFC "Date and Time on the Internet: Timestamps":
http://www.faqs.org/rfcs/rfc3339.html
Other Relevent standards that specify dates are:
RFC 822 and RFC 1123
The HTTP protocol accepts dates in a number of formats, from section 3.3.1:
"HTTP applications have historically allowed three different formats for the representation of date/time stamps:
Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036 Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format"
Hope this helps Mark
Quoting [Christopher Smith] (May 05 2006):
Does anybody have a pointer to the relevant ISO standard?
Is there an ISO standard for that?
I found this link:
http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html
but I haven't read it in any detail.
-- Chris