Article View: borland.public.cppbuilder.nativeapi
Article #17143Re: GMT/UTC Offset Value
From: Dennis Jones
Date: Mon, 07 Apr 2003 16:12
Date: Mon, 07 Apr 2003 16:12
19 lines
1588 bytes
1588 bytes
"ibrahim canpunar" <ibrahim.canpunar@bilten.metu.edu.tr> wrote in message news:3e918aa6@newsgroups.borland.com... > Hi All, > How can we obtain the GMT Offset value (+2, +5 ...) for a date without > changing the computer's clock. > > Thanks all, > ibrahim I'm not sure what you mean by "Offset value", but I assume you want to know the number of hours difference between local time and UTC. To do this, you can use GetTimeZoneInformation() and retrieve the 'Bias' member of the TIME_ZONE_INFORMATION structure. Then divide by 60 (Bias is the number of minutes difference between local time and GMT). Does this help? - Dennis
Technical Details
Message-ID:
<3e91a373$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3e918aa6@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,196352cea27da7f5 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-04-07 09:18:37 PST From: "Dennis Jones" <djones@nospam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3e918aa6@newsgroups.borland.com> Subject: Re: GMT/UTC Offset Value Date: Mon, 7 Apr 2003 09:12:33 -0700 Lines: 21 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 204.200.27.7 Message-ID: <3e91a373$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1049731955 204.200.27.7 (7 Apr 2003 09:12:35 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail