[Q][Celeste] How do I set the time zone

Lex Spoon lex at cc.gatech.edu
Tue Mar 19 22:49:20 UTC 2002


hannes.hirzel.squeaklist at bluewin.ch wrote:
> Hi
> 
> How do I set the time zone in Celeste? I suppose the default time given
> by Celeste is Greenwich Mean Time (GMT) and I have then to add how many
> hours ahead or behind GMT the time is the local clock gives me.
> 
> But the question is: which menu gives me the option of setting the time
> correctly.
> 
> This is important for me as the filter options are very nice to track a
> conversation (sent and received mails) by just filtering participants.
> However for easy tracking the entries have to be sorted correctly and
> that means that the time stamp should be correct.
> 

Uh, well there's a class variable somewhere...  Yes, "TimeZone", in
class "Celeste".  It's just a string, so I imagine whatever you put just
gets tacked on to the Date string.

Why so clunky?  Because there's a Right Way, and it simply hasn't been
reassembled.  The Right Way is:

	1. Have a primitive that returns the local time plus its offset from GMT.

	2. Use it in Celeste.


I put all this together once, but it sort of fizzled -- the only uses of this
are Celeste and (theoretically) HTTP caching, and also the way I assembled
it required the ANSI DateAndTime class, which Squeak doesn't have.  But
it could be reassembled for folks who don't mind needing a non-standard
plugin and who don't mind running with the ANSI changesets loaded.

(Incidentally, the ANSI changesets have their *own* variable for the timezone,
which is used if the primitive isn't available.  Yet another reason not to do
it in Celeste!)


-Lex



More information about the Squeak-dev mailing list