[ENH?] Time functions (was: [FIX] Various fixes for Celeste)

David T. Lewis lewis at mail.msen.com
Sat Nov 27 23:12:43 UTC 1999


--+HP7ph2BbKc20aGI
Content-Type: text/plain; charset=us-ascii


OK, here's an an attempt at implementing the suggestion which Lex
made a while back. The pluggable primitive builds on unix systems
and can hopefully be hacked into submission on other platforms.

- Dave

On Wed, Nov 24, 1999 at 10:38:18AM -0800, Alan Kay wrote:
> Lex --
> 
> I like your suggestion ...
> 
> Cheers,
> 
> Alan
> 
> ------
> 
> At 9:59 AM -0800 11/24/99, Lex Spoon wrote:
> >Tim Rowledge <rowledge at interval.com> wrote:
> >> On Tue 23 Nov, Lex Spoon wrote:
> >>
> >> > I keep hoping someone will jump up who understands time zones and
> >> > calendrial calculations and such and implement something in Squeak that
> >> > can be easily ported around.
> >> Oh my, that's a _lot_ to hope for! At PPS some years ago we had a
> >> multi-day mailstorm about timezone stuff that generated enough hot air
> >> to send Branson across the Atlantic. Conclusion: it's _damn_
> >> complicated. Basically you need a way to read the time and your
> >> machine's timezone, plus a way to convert from one TZ to another.
> >>
> >> The good news is that by now all the OS's we use have at least some
> >> understanding of timezones, where back then many didn't. I don't suppose
> >> there is a website that offers zone/time conversion ? It may well be
> >> simplest to pass the job off to a server somewhere.
> >> Some timezones have a partial hour offset.
> >> Some have wierd rules for daylight savings time start/stop.
> >> Some appear to have no 'rules' - IIRC, UK DST is set on a year by year
> >> basis.
> >> Some have many names.
> >> Ugh.
> >
> >Hmm, okay, it would be kind of a shame to have 10k lines of code
> >floating around the smalltalk image just to deal with this one issue.
> >Though it's always nice to have things that are quietly Done Right, it's
> >also nice to have code proportional to the benefit you get from it.
> >
> >Maybe to get started, we should simply add a "localtime" primitive to
> >Squeak, which returns a tuple of both the global (GMT) time, and an
> >offset from it to get to local time?  This would avoid a lot of
> >conversion messes, and constrained platforms could simply implement the
> >local-time offset as a constant somewhere.  There is already a basic
> >dateAndTimeFromSeconds: implementation in class Time, so maybe this
> >primitive would take us a long way.
> >
> >What do ya'll think?
> >
> >Lex
> 

--+HP7ph2BbKc20aGI
Content-Type: text/plain; name="Time.27Nov548pm.cs"
 ; x-mac-type="54455854"
 ; x-mac-creator="522A6368"
Content-Disposition: attachment; filename="Time.27Nov548pm.cs"
Content-Transfer-Encoding: imap_stub

0,1742,2,25877,858,

--+HP7ph2BbKc20aGI--





More information about the Squeak-dev mailing list