[ENH] local vs. UTC time

R. A. Harmon harmonra at webname.com
Thu Jun 29 16:12:30 UTC 2000


At 05:05 PM 6/28/00 -700, "lex spoon" <lex at cc.gatech.edu> wrote:
>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.

I think the ANSI Date And Time protocol messages should do the above.  I've
implemented in Squeak it along with all the ANSI messages except for Stream
and FileStream protocols and maybe a couple Collection protocol messages.  

I've reworked the Camp Smalltalk ANSI tests for Squeak released by Ralph E.
Johnson for my ANSI implementation.  The reworked version,
ANSIChgSeta02r01Sqkv02r07.ZIP, containing Squeak ANSI messages, tests, and
support is now available at my web page:
 
         http://homepage2.rconnect.com/raharmon/


I think Squeak Central is looking at incorporating the ANSI messages in the
standard release.  I think it might be a more portable and easier route to
use the ANSI messages for doing the time stuff above.




--
Richard A. Harmon          "The only good zombie is a dead zombie"
harmonra at webname.com           E. G. McCarthy
Spencer, Iowa





More information about the Squeak-dev mailing list