Hi,
I'm trying to use the time zone information provided by a Locale, but if do: Locale default timeZoneInformation "Display-it" It fails to print the TIME_ZONE_INFORMATION. However, if I don't display it, it works, answering a two elements array (???), with the second element being the TIME_ZONE_INFORMATION instance. However, the TIME_ZONE_INFORMATION>>bias method answer the bias minutes related to GMT 0 (Greenwich), but it answers it with the inverse sign. i.e. my local bias is -180 and if I evaluate #bias, it answers 180. And finally, the timeZoneInformation allways answers the TZI of the system locale, and not the one defined for an specific locale Looking at the MSDN, it seems that is OK, just that the Dolphin implementation may lead to confusion, because the #timeZoneInformation is implemented in Locale, when perhaps it should be in Locale class, because it always answers the same, whatever the locale instance receiver is. Best regards. -- Esteban. |
Esteban,
> I'm trying to use the time zone information provided by a Locale, > but if do: > > Locale default timeZoneInformation "Display-it" > It fails to print the TIME_ZONE_INFORMATION. Chris Uppal raised this in a post on the 26th September 2004 entitled "Bug in Locale timezone info". The thread didn't have a fix but Chris may have come up with the reason for the problem. BTW, It still fails in D6 > However, the TIME_ZONE_INFORMATION>>bias method answer the bias minutes > related to GMT 0 (Greenwich), but it answers it with the inverse sign. > i.e. my local bias is -180 and if I evaluate #bias, it answers 180. Can't really help there - mine answers 0 :-) -- Ian Use the Reply-To address to contact me. Mail sent to the From address is ignored. |
In reply to this post by Esteban A. Maringolo-3
Esteban A. Maringolo wrote:
> Locale default timeZoneInformation "Display-it" > It fails to print the TIME_ZONE_INFORMATION. Yeah, apparently the somewhat non-standard usage of SYSTEMTIME by the TIME_ZONE_INFORMATION structure for representing the StandardDate and DaylightDate messes up its conversion to a print string. My guess is the way that they use year=0 to signify that day is really week of the month [sic]. > However, if I don't display it, it works, answering a two elements array > (???), with the second element being the TIME_ZONE_INFORMATION instance. The reason for two element array is that the first is the GetTimeZoneInformation return code, which tells whether the system is currently in daylight savings time mode or not (or can't be determined). > However, the TIME_ZONE_INFORMATION>>bias method answer the bias minutes > related to GMT 0 (Greenwich), but it answers it with the inverse sign. > i.e. my local bias is -180 and if I evaluate #bias, it answers 180. The inverse sign is probably right. Though the opposite of what is typically displayed (which is the offset of the local time from GMT). MSDN defines TIME_ZONE_INFORMATION bias as: UTC = local time + bias Hope this helped clarify a few things. -- Bill Dargel [hidden email] Shoshana Technologies 100 West Joy Road, Ann Arbor, MI 48105 USA |
Bill Dargel escribió:
> Esteban A. Maringolo wrote: >> However, if I don't display it, it works, answering a two elements >> array (???), with the second element being the TIME_ZONE_INFORMATION >> instance. > The reason for two element array is that the first is the > GetTimeZoneInformation return code, which tells whether the system is > currently in daylight savings time mode or not (or can't be determined). Yes, but I panic when I see an smalltalk method returning a fixed size collection with distinct elements on each position :-) >> However, the TIME_ZONE_INFORMATION>>bias method answer the bias >> minutes related to GMT 0 (Greenwich), but it answers it with the >> inverse sign. i.e. my local bias is -180 and if I evaluate #bias, it >> answers 180. > The inverse sign is probably right. Though the opposite of what is > typically displayed (which is the offset of the local time from GMT). > MSDN defines TIME_ZONE_INFORMATION bias as: > UTC = local time + bias > Hope this helped clarify a few things. Yes, MSDN says that, and now that I think... it's right. I'm 3hours before Greenwich. Best regards, -- Esteban. |
Free forum by Nabble | Edit this page |