[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squeak-vm-dev
Subject:    Re: [Vm-dev] Timezones in LocalePlugin
From:       Andreas Raab <andreas.raab () gmx ! de>
Date:       2008-08-29 14:15:18
Message-ID: 48B80476.4050702 () gmx ! de
[Download RAW message or body]

 
 > Do you use other functions from the locale plugin? I noticed at least
 > the format methods are not correct under Linux, too ...

Currently we only use the time zone functions.

Cheers,
   - Andreas

Bert Freudenberg wrote:
> 
> 
> Am 28.08.2008 um 18:58 schrieb Andreas Raab:
> 
>> Hi Bert -
>>
>> Looks like we're in violent agreement (Brad's note attached).
> 
> Great!
> 
>> I checked in the fix for the Windows VM and here is the code that we 
>> use in the Unix locale plugin:
>>
>> sqInt    sqLocGetVMOffsetToUTC(void) {
>>     return 0;
>> }
>>
>> sqInt    sqLocGetTimezoneOffset(void) {
>>     struct tm * timeBlock;
>>     time_t theTime;
>>     theTime = time((time_t)NULL);
>>     timeBlock = localtime(&theTime);
>>     return timeBlock->tm_gmtoff / 60;
>> }
>>
>> sqInt    sqLocDaylightSavings(void) {
>>     struct tm * timeBlock;
>>     time_t theTime;
>>     theTime = time((time_t)NULL);
>>     timeBlock = localtime(&theTime);
>>     return timeBlock->tm_isdst;
>> }
> 
> 
> Mine looks pretty similar. It's written to be the reverse of 
> convertToSqueakTime() which is special-cased to work across a variety of 
> Unices (tm_gmtoff is a BSDism, also in glibc, but not strict ISO C).
> 
> I'll fix the DST function too, didn't need it for now.
> 
> Btw, in the OLPC image we use it like this:
> 
> http://tinlizzie.org/updates/etoys/updates/2092LocalePluginAddins-tpr.cs
> http://tinlizzie.org/updates/etoys/updates/2106chronologyUnix-bf.cs
> 
> Do you use other functions from the locale plugin? I noticed at least 
> the format methods are not correct under Linux, too ...
> 
> - Bert -
> 
> 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic