Delphi32.com - Home!
| Home/News | Downloads | Forums | D32 Magazine | Resources | Info and Facts |  
 
 Get Time Zone Information


The following information applies to:
  • Windows API
  • Delphi (All Versions)
Steps, Assumptions, Procedures:
  • Uses Windows.pas
Code:


1.  procedure GetTimeZoneBias;
2.  var
3.      TZoneInfo: TTimeZoneInformation;
4.      TimeZoneBias: longint;
5.  begin
6.          GetTimeZoneInformation(TZoneInfo);
7.          TimeZoneBias := TZoneInfo.Bias;
8.  end;
Results:
The local time zone bias is now stored in the variable named TimeZoneBias.
Explanation:
The GetTimeZoneInfo() API function fills out a structure containing the current time-zone parameters. These parameters control the translations between Coordinated Universal Time (UTC) and local time.
Notes:
The TTimeZoneInformation structure contains the following:
Parameter Explanation
Bias: LongSpecifies the current bias, in minutes, for local time translation on this computer. The bias is the difference, in minutes, between Coordinated Universal Time (UTC) and local time. All translations between UTC and local time are based on the following formula: UTC = local time + bias
See Windows API Help file for further details about this structure.
Submission Information:
Submitted by: Urban
E-Mail: urban@scc.net


© 1996, 1997, 1998 Urban. All rights reserved.



 
 Hits/month  2,500,000+ 
 Downloads
 (Since May 2000)
 7,393,709 
 Total Files  6,023 
 Forum msgs  7,670 
 Articles/FAQs  70+/900+ 
Kylix
Tips n Tricks
FAQs
Knowledge Base
Bug Listings
Articles
Books
Newsgroups
Links
Submissions
Testimonials
Advertising
Contact Us
About Us
Search Amazon:
Top Selling Software at Amazon

| Home/News | Downloads | Forums | Resources | Info and Facts | Testimonials |
  Site Search:
 


Comments/Problems: Webmaster@delphi32.com
Copyright © 1998-2006, Delphi32.com. All rights reserved.
Terms of Use