Ethereal-users: Re: [Ethereal-users] Time Protocol date calculated wrongly?

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Guy Harris" <gharris@xxxxxxxxx>
Date: Wed, 1 Sep 2004 11:59:13 -0700 (PDT)
Sasha M said:
> It seems that when Ethereal decodes time field in the packet sent by Time
> Protocol server (RFC 868), it is off by one day. For example, server will
> report c4-e0-6d-b4, and ToD client will properly decode this as Sept 01,
> 2004 11:48:04. However, in Ethereal 0.10.6 this number will be decoded as
> Aug 31, 2004 11:48:04.

The Time Protocol dissector was using some calculated value for the delta
between the Time Protocol epoch and the UNIX epoch; however, RFC 868
explicitly says

    the time  2,208,988,800 corresponds to 00:00  1 Jan 1970 GMT

(given that RFC 868 was published in the early '80's, I suspect it was
*not* a coincidence that it chose "00:00 1 Jan 1970 GMT" as one of the
example times - and the same applies to "00:00 17 Nov 1858 GMT" for VMS
(yes, as I remember, VMS keeps, or at least kept, local time, but...), and
probably applies to at least some of the other time stamps they give as
well), and that's *not* what the calculated value was.

I've checked in a change to explicitly use 2208988800U as the delta.