[JDEV] Message timestamps

Eric Bowersox ebowersox at corp.webb.net
Mon Oct 4 17:57:53 CDT 1999

> 	This format is the preferred method of dealing with dates when
> using C and C++.  As such, I don't know of ANY language which doesn't
> support dates in this format.  (Including date manipulation 
> routines.)

Visual Basic?  (Not that *I'm* going to write any VB code, mind you, but I
needed a counterexample...VB's date format is a floating-point number of
days since January 1, 1900.  Dates before that time are indicated by
negative numbers.  Time within a day is indicated by using the fractional
part of the value.)
> 	Jabber seems to be trying for a human parsable format with XML.
> That's fine, and a worthy goal, so having a date like
> <datetime>939077263</datetime> isn't a good idea, but in 
> general this is
> the best way to do it.

The reason why I suggested ISO 8601, aside from the fact that I saw it used
for this purpose in the XML-RPC specification, is that it strikes a balance
between human readability and machine parsability.  Since all the fields are
fixed-width, times are always GMT, and there are no issues of whitespace or
alphabetic month/day-of-week names to consider, the format can be easily
parsed (can anyone write code for parsing general RFC 822 dates as tight as
code that would parse an ISO 8601 date?); however, it's also fairly easy for
a human to look at it and see what it means, unlike a raw time_t value.


More information about the JDev mailing list