| |
| Get Time Zone Information |
 |
| The following information applies to: |
- Windows API
- Delphi (All Versions)
|
| Steps, Assumptions, Procedures:
|
|
|
| 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: Long | Specifies 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+ |
Top Selling Software at Amazon
|