[ENH] local vs. UTC time
lex spoon
lex at cc.gatech.edu
Thu Jun 29 00:05:11 UTC 2000
Here are a pair of changesets that let Squeak discern local vs. UTC
time. It adds one primitive, which returns both the local time and UTC
in parallel. Squeak-level code can then interpret this information as
needed.
The first changeset defines the primitive and a plugin that implements
it. It should be fairly portable, but I've only tried it on Linux. The
second changeset updates the Time class to use the new plugin when its
present, and it updates Celeste to make date stamps with it.
How does this look to people? It seems to allow the following basic
time functions, with a minimum of fuss:
1. Return a UTC time precise to the second. This is useful when
Squeak's are talking to each other from different places in the world.
It's also precisely what's needed for building a proper HTTP cache.
2. Return a local time precise to the second. This is useful for clock
and calender displays.
3. Return a local time plus a delta from UTC. This is what email is
happiest with.
Is anything critical missing? What else would people like to be able to
do with time? If this looks good, let's put it in the main system.
-Lex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TimePlugin.4.cs
Type: application/octet-stream
Size: 4056 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000628/e1061592/TimePlugin.4.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: useTimePlugin.3.cs
Type: application/octet-stream
Size: 1967 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000628/e1061592/useTimePlugin.3.obj
-------------- next part --------------
More information about the Squeak-dev
mailing list
|