>>>I need to convert a GMT DateTime value to the appropriate local time value.
>>>Does anybody know of any functions that obtain the GMT offset?
>>>
>>>TIA
>>
>>Peter,
>>
>>If you mean UTC (Universal Coordinated Time) rather than GMT, then the Windows API has some functions that will do this for you. The file system uses UTC time to store the date/time stamp. I've programming in the download section that demonstrates this. Simply click
Windows Time to download.
>
>George,
>
>I am collecting NT/2000 performance data, and I assume that the timestamp I am being given is GMT.
>In order to report meaningfully on the data, I need to convert this to the local time.
>What exactly does UTC express?
UTC and GMT are often used interchangeably. There are a series of functions in the API for converting back and forth between the local time and the UTC time. These are: SystemTimeToFileTime(), LocalFileTimeToFileTime(), FileTimeToLocalFileTime(), and FileTimeToSystemTime(). How to deal with these functions is demonstrated in the code provided in the download.
UTC time is fixed and never adjusts for daylight savings or standard time. The API also provides a function (GetTimeZoneInformation()), from which you can retrieve information regarding the localized time zone name (for example, Eastern Standard Time), the bias (the difference between the local time and UTC time), and the dates (if applicable) when the local time changes from standard to daylight savings.
George
Ubi caritas et amor, deus ibi est