[JDEV] Message timestamps
zoomjuice at yahoo.com
Fri Oct 8 16:21:53 CDT 1999
> I would expect that however it is formatted, the servers would be the ones
> generating the timestamps. Something along the lines of: the client would
> send the message, their server would "stamp" it and send it to the
> recipient's server, it gets "stamped" again by that server, and then
> either delivered to the client or stored offline for that user.
(a) Just to interject a small point here: timestamps should never be used in any
algorithm as a substitute for an explicit sequencing number - for messsages
that have to be sequenced, because 1 second is just not high enough
resolution, in fact there is no resolution high enough.
(b) Having read the whole thread and done a *lot* of date arithmetic in my time,
I have to side with those who think one big number, the number of seconds from
some arbitrary starting point (say: midnight of the day before release 0.0
of Jabber) is the right way to do timestamps. The main reason is that the
client implementations will be more likely to be correctly coded.
To make sure coders get the calculation right, post a piece of generic C code
that does the conversions correctly gives as examples the correct
timestamp-yyyymmdd pairs for a few dates... time 0; time exactly one day after
time 0; time now (roughly); time sometime in the future; etc.
Just my .02
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com
More information about the JDev