[Vm-dev] Timezones in LocalePlugin

Andreas Raab andreas.raab at gmx.de
Thu Aug 28 16:58:28 UTC 2008


Hi Bert -

Looks like we're in violent agreement (Brad's note attached). 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;
}

Cheers,
   - Andreas

-------------- next part --------------
An embedded message was scrubbed...
From: Brad Fowlow <brad.fowlow at qwaq.com>
Subject: Re: [Fwd: [Vm-dev] Timezones in LocalePlugin]
Date: Thu, 28 Aug 2008 09:25:48 -0700
Size: 4272
Url: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20080828/42762408/AttachedMessage.eml


More information about the Vm-dev mailing list