Article View: borland.public.cppbuilder.nativeapi
Article #5745Re: Datetime conversion between timezones
From: Michael Gillen
Date: Sat, 09 Jul 2005 00:58
Date: Sat, 09 Jul 2005 00:58
45 lines
2579 bytes
2579 bytes
Dennis Jones wrote: > > "Michael Gillen" <michael@gillenconsultinggroup-nospam.com> wrote in message > news:42cef33b$1@newsgroups.borland.com... > > Dennis Jones wrote: > > > Several timezones have the same offset from UTC, but have differing > rules > > > for dealing with standard/daylight times. So, if your sole piece of > > > information about a timezone is its offset from UTC, you have an > ambiguity > > > for which there is no resolution. For instance, if you have -0700, > there is > > > no way to know if that refers to Mountain Standard Time (which adjusts > for > > > daylight savings) or US Mountain Standard Time (Arizona, which does not > > > adjust for daylight savings). Sigh. > > > > > > - Dennis > > > > I beleive that here's the key that you want. > > > > HKLM\CurrentControlSet\Control\TimeZoneInformation > > Michael, > > You must have misread my comment. That registry data is exactly what you > get when you call GetTimeZoneInformation, and has no bearing on the problem > I described. How did you think it could be used to resolve the ambiguity? > > - Dennis You are right, I first understood it, then the regestry entry got me off thinking off track. If your ONLY information is the offset from UTC then yes, you are screwed. Otherwise, if access to the registry is available; If the TimeZone is set to Pacific, for example, the DaylightBias and StandardBias are different as are DaylightName and StandardName. For Arizona and Hawaii DaylightBias and StandardBias are both 0x00 and DaylightName and StandardName are the same. But I beleive that in the case you described, you are SOL 3-( -- -Michael Gillen
Technical Details
Message-ID:
<42cf2135$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<42cec603$1@newsgroups.borland.com> <42ceea0d@newsgroups.borland.com> <42cef33b$1@newsgroups.borland.com> <42cef722$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,424ca78a9d71afb X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Michael Gillen" <michael@gillenconsultinggroup-nospam.com> Subject: Re: Datetime conversion between timezones Newsgroups: borland.public.cppbuilder.nativeapi References: <42cec603$1@newsgroups.borland.com> <42ceea0d@newsgroups.borland.com> <42cef33b$1@newsgroups.borland.com> <42cef722$1@newsgroups.borland.com> User-Agent: XanaNews/1.17.5.7 NNTP-Posting-Host: 69.238.193.105 Message-ID: <42cf2135$1@newsgroups.borland.com> Date: 8 Jul 2005 17:58:29 -0700 X-Trace: newsgroups.borland.com 1120870709 69.238.193.105 (8 Jul 2005 17:58:29 -0700) Lines: 45 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail