TimeZone setup, as simple as possible
Brent Pinkney
brent at zamail.co.za
Tue Aug 21 20:50:56 UTC 2007
Hi,
> 2007/8/21, Janko Mivšek <janko.mivsek at eranova.si>:
> > Hi,
> >
> > I'm just going through the challenge to set a local timezone correctly and I'm wondering why there is no something as simple as:
>
> TimeZone setLocal: 'CET'
>
There is.
The standard DateAndTime implementation in the image has #localTimeZone:
I for example use:
sast := TimeZone timeZones fourth.
sast offset. " 0:02:00:00 - always two hours ahead"
DateAndTime localTimeZone: sast.
DateAndTime now. "2007-08-21T22:47:04+02:00 - as it should be"
Of course, the IDE would have told you this by browsing all references to class TimeZone - it is the first result.
Regards
Brent
More information about the Squeak-dev
mailing list
|