Another day, another playground. I was thinking about questions (which never got answered from the company – by the way: why ?) in the Instantiation forum, why there is no call to retrieve a platform independent call to get an offset to UTC (Is there a platform independent way to get UTC/GMT time?) and perhaps fixing a five year old bug, preventing to do any serious time zone calculation with VASmalltalk (primitiveSystemOffset). Then there is perhaps missing serious Unicode support – and then I did some work with a (very large) library from IBM: ICU – International Components for Unicode (available from ICU. This library seems to be available on all platforms VASmalltalk is running on.
I uploaded my play-code to VastGoodies – inroducing support for locales (e.g. “de_DE” or “en_US”) and calendars. Calendars are more or less instances of DateAndTime with locale information and timezone information. I added conversions to/from instances of DateAndTime.
With the code already available you can do time calculation in various time zones. You get helping support for GUI’s by getting lists of supported locales and time zones, perhaps stuff only available in Chronos library and it was my first time to do something useful with instances of DBString 🙂
It actually fixes the two problems mentioned above – and though I’ve not tested it under Linux I expect that it will work there too, because so many people are using this library.
And using this library also improves my wish: bring Smalltalk back to the mainstream by using mainstream components.
In some follow-up postings I will talk about how the first code is working.