[FIX] Various fixes for Celeste

Eric Ulevik eau at fast.fujitsu.com.au
Thu Nov 25 23:56:46 UTC 1999


From: Lex Spoon <lex at cc.gatech.edu>
> > 1) A primitive to answer seconds (or milliseconds) since the dawn of
time.
> > We should not use the existing Time>>primDateAndTimeNow because it is
not
> > a monotonically increasing function (its values jump forward and
backward
> > when you cross a daylight savings time boundary).
> >
> > 2) A primitive to answer the offset of local time versus UTC, for
purposes
> > of calculating local time and date. This offset varies by timezone as
> > well as by the effect of daylight savings time conventions.
>
> It seems that these two items should be tied into a single atomic
> primitive; that way you avoid the problem of querying the time just
> before a daylight switch, and then querying the offset afterwards.
> Okay, it's unlikely, but putting the queries into a single atomic
> primitive makes reasoning about it much.

This is not a problem, because you never want to ask just for the offset.
Consider displaying an email's time locally. This would require asking for
the offset at a UTC time in the near past.

The point is that the second primitive must take UTC value and time zone as
input, and return the local time. Also note this is not a 1:1 map.

Regards,

Eric Ulevik





More information about the Squeak-dev mailing list