Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Converts a time in Coordinated Universal Time (UTC) to a specified time zone's corresponding local time.
BOOL SystemTimeToTzSpecificLocalTime(
[in, optional] const TIME_ZONE_INFORMATION *lpTimeZoneInformation,
[in] const SYSTEMTIME *lpUniversalTime,
[out] LPSYSTEMTIME lpLocalTime
);
[in, optional] lpTimeZoneInformation
A pointer to a TIME_ZONE_INFORMATION structure that specifies the time zone of interest.
If lpTimeZone is NULL, the function uses the currently active time zone.
[in] lpUniversalTime
A pointer to a SYSTEMTIME structure that specifies the UTC time to be converted. The function converts this universal time to the specified time zone's corresponding local time.
[out] lpLocalTime
A pointer to a SYSTEMTIME structure that receives the local time.
If the function succeeds, the return value is nonzero, and the function sets the members of the SYSTEMTIME structure pointed to by lpLocalTime to the appropriate local time values.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
The SystemTimeToTzSpecificLocalTime function takes into account whether daylight saving time (DST) is in effect for the local time to which the system time is to be converted.
The SystemTimeToTzSpecificLocalTime function may calculate the local time incorrectly under the following conditions:
For an example, see Retrieving the Last-Write Time.
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps | UWP apps] |
Minimum supported server | Windows 2000 Server [desktop apps | UWP apps] |
Target Platform | Windows |
Header | timezoneapi.h (include Windows.h) |
Library | Kernel32.lib |
DLL | Kernel32.dll |
Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!