Time Functions
The following functions are used with system time.
Function | Description |
---|---|
GetSystemTime | Retrieves the current system date and time in UTC format. |
GetSystemTimeAdjustment | Determines whether the system is applying periodic time adjustments to its time-of-day clock. |
GetTimeFormat | Formats a system time as a time string for a specified locale. |
NtQuerySystemTime | Returns the system time. |
RtlLocalTimeToSystemTime | Converts the specified local time to system time. |
RtlTimeToSecondsSince1970 | Converts the specified system time to the number of seconds since the first second of January 1, 1970. |
SetSystemTime | Sets the current system time and date. |
SetSystemTimeAdjustment | Enables or disables periodic time adjustments to the system’s time-of-day clock. |
SystemTimeToFileTime | Converts a system time to a file time. |
SystemTimeToTzSpecificLocalTime | Converts a UTC time to a specified time zone’s corresponding local time. |
TzSpecificLocalTimeToSystemTime | Converts a local time to a UTC time. |
The following functions are used with local time.
Function | Description |
---|---|
EnumDynamicTimeZoneInformation | Enumerates dynamic daylight saving time information entries stored in the registry. |
FileTimeToLocalFileTime | Converts a UTC file time to a local file time. |
GetDynamicTimeZoneInformation | Retrieves the current time zone and dynamic daylight saving time settings. |
GetDynamicTimeZoneInformationEffectiveYears | Retrieves a range, expressed in years, for which a DYNAMIC_TIME_ZONE_INFORMATION has valid entries. |
GetLocalTime | Retrieves the current local date and time. |
GetTimeZoneInformation | Retrieves the current time zone settings. |
GetTimeZoneInformationForYear | Retrieves the time zone settings for the specified year and time zone. |
RtlLocalTimeToSystemTime | Converts the specified local time to system time. |
SetDynamicTimeZoneInformation | Sets the current time zone and dynamic daylight saving time settings. |
SetLocalTime | Sets the current local time and date. |
SetTimeZoneInformation | Sets the current time zone settings. |
SystemTimeToTzSpecificLocalTime | Converts a UTC time to a specified time zone’s corresponding local time. |
SystemTimeToTzSpecificLocalTimeEx | Converts a UTC time with dynamic daylight saving time settings to a specified time zone’s corresponding local time. |
TzSpecificLocalTimeToSystemTime | Converts a local time to a UTC time. |
TzSpecificLocalTimeToSystemTimeEx | Converts a local time with dynamic daylight saving time settings to UTC time. |
The following functions are used with file time.
Function | Description |
---|---|
CompareFileTime | Compares two file times. |
FileTimeToLocalFileTime | Converts a UTC file time to a local file time. |
FileTimeToSystemTime | Converts a file time to system time format. |
GetFileTime | Retrieves the date and time that the specified file or directory was created, last accessed, and last modified. |
GetSystemTimeAsFileTime | Retrieves the current system date and time in UTC format. |
LocalFileTimeToFileTime | Converts a local file time to a file time based on UTC. |
SetFileTime | Sets the date and time that the specified file or directory was created, last accessed, or last modified. |
SystemTimeToFileTime | Converts a system time to a file time. |
The following functions are used with MS-DOS date and time.
Function | Description |
---|---|
DosDateTimeToFileTime | Converts MS-DOS date and time values to a file time. |
FileTimeToDosDateTime | Converts a file time to MS-DOS date and time values. |
The following functions are used with Windows time.
Function | Description |
---|---|
GetSystemTimes | Retrieves system timing information. |
GetTickCount | Retrieves the number of milliseconds that have elapsed since the system was started, up to 49.7 days. |
GetTickCount64 | Retrieves the number of milliseconds that have elapsed since the system was started. |
The following functions are used with high-resolution performance counters.
Function | Description |
---|---|
QueryPerformanceCounter | Retrieves the current value of the high-resolution performance counter. |
QueryPerformanceFrequency | Retrieves the frequency of the high-resolution performance counter. |
The following functions are used with the auxiliary performance counter.
Function | Description |
---|---|
QueryAuxiliaryCounterFrequency | Queries the auxiliary counter frequency. |
ConvertAuxiliaryCounterToPerformanceCounter | Converts the specified auxiliary counter value to the corresponding performance counter value; optionally provides the estimated conversion error in nanoseconds due to latencies and maximum possible drift. |
ConvertPerformanceCounterToAuxiliaryCounter | Converts the specified performance counter value to the corresponding auxiliary counter value; optionally provides the estimated conversion error in nanoseconds due to latencies and maximum possible drift. |
The following function is used with interrupt time.
Time zone changes for Russia in Windows
Summary
In accordance with recently passed Russian law, the following regions in Russia were scheduled to switch time zones on March 27, 2016, at 02:00 local time. Microsoft has released an update to Windows, dated Tuesday, April 12, 2016, to reflect these changes.
Old time zone offset
New time zone offset
Resolution
The update that is described in this article changes the time zone data to accommodate daylight saving time (DST) changes in several countries.
This is a cumulative update rollup that includes all previous Windows time zone changes. For more information about how DST changes may affect other Microsoft products, go to the following Microsoft websites:
When you apply this update, you may receive a message that resembles the following:
Update cannot be installed as a newer or same time zone update has already been installed on the system.This message indicates that either you have already applied the correct update or Windows Updates or Microsoft Update has automatically installed this update. No additional action is required to update the Windows operating system.
How to get this updateThe following files are available for download and installation from the Microsoft Download Center.
All supported x86-based versions of Windows 8.1
Download the package now.
All supported x64-based versions of Windows 8.1
Download the package now.
All supported x64-based versions of Windows Server 2012 R2
Download the package now.
All supported x64-based versions of Windows Server 2012
Download the package now.
All supported x86-based versions of Windows 7
Download the package now.
All supported x64-based versions of Windows 7
Download the package now.
All supported x64-based versions of Windows Server 2008 R2
Download the package now.
All supported IA-based versions of Windows Server 2008 R2
Download the package now.
All supported x86-based versions of Windows Vista
Download the package now.
All supported x64-based versions of Windows Vista
Download the package now.
All supported x86-based versions of Windows Server 2008
Download the package now.
All supported x64-based versions of Windows Server 2008
Download the package now.
All supported IA-based versions of Windows Server 2008
Download the package now.
For more information about how to download Microsoft support files, click the following article number to go to the article in the Microsoft Knowledge Base:
Microsoft scanned these files for viruses. Microsoft used the most current virus-detection software that was available on the date that the files were posted. The files are stored on security-enhanced servers that help prevent any unauthorized changes to the files.
PrerequisitesWindows 8.1 and Windows Server 2012 R2
To apply this update, you must have update 2919355 installed. For more information about how to get this update, click the following article number to go to the article in the Microsoft Knowledge Base:
No prerequisites are required to apply this update.
Windows 7 and Windows Server 2008 R2
No prerequisites are required to apply this update. The same package installs both on the RTM version and the Service Pack 1 versions of Windows 7 and Windows Server 2008 R2. For more information about how to get a Windows 7 or a Windows Server 2008 R2 service pack, click the following article number to go to the article in the Microsoft Knowledge Base:
To apply this update, you must be running Windows Vista Service Pack 2 (SP2) or Windows Server 2008 SP2.
For more information about how to get a Windows Server 2008 service pack, click the following article number to go to the article in the Microsoft Knowledge Base:
Registry informationTo apply this update, you don’t have to make any changes to the registry.
Restart requirementYou must restart the computer after you install this cumulative update.
Changes to Windows time zone data
This update includes the following changes and additions. Users in the affected regions can switch to these new time zones after the update is installed.
Astrakhan Oblast & Ulyanovsk Oblast
Time zone key / ID
Astrakhan Standard Time
English display name
(UTC+04:00) Astrakhan, Ulyanovsk
Time zone offset (before transition)
Time zone offset (after transition)
Altai Republic & Altai Krai
Time zone key / ID
Altai Standard Time
English display name
(UTC+07:00) Barnaul, Gorno-Altaysk
Time zone offset (before transition)
Time zone offset (after transition)
Time zone key / ID
Transbaikal Standard Time
English display name
Time zone offset (before transition)
Time zone offset (after transition)
Time zone key / ID
Sakhalin Standard Time
English display name
Time zone offset (before transition)
Time zone offset (after transition)
Changes to Existing Time ZonesThese changes affect the display name only. No time changes will be introduced.
Time zone key / ID
Old display name
New display name
Kaliningrad Standard Time
(UTC+02:00) Kaliningrad (RTZ 1)
Russian Standard Time
(UTC+03:00) Moscow, St. Petersburg, Volgograd (RTZ 2)
(UTC+03:00) Moscow, St. Petersburg, Volgograd
Russia Time Zone 3
(UTC+04:00) Izhevsk, Samara (RTZ 3)
(UTC+04:00) Izhevsk, Samara
Ekaterinburg Standard Time
(UTC+05:00) Ekaterinburg (RTZ 4)
North Central Asia Standard Time
(UTC+06:00) Novosibirsk (RTZ 5)
North Asia Standard Time
(UTC+07:00) Krasnoyarsk (RTZ 6)
North Asia East Standard Time
(UTC+08:00) Irkutsk (RTZ 7)
Yakutsk Standard Time
(UTC+09:00) Yakutsk (RTZ 8)
Vladivostok Standard Time
(UTC+10:00) Vladivostok, Magadan (RTZ 9)
Russia Time Zone 10
(UTC+11:00) Chokurdakh (RTZ 10)
Russia Time Zone 11
(UTC+12:00) Anadyr, Petropavlovsk-Kamchatsky (RTZ 11)
(UTC+12:00) Anadyr, Petropavlovsk-Kamchatsky
File informationFor a list of the files that are provided in this update, download the file information for update 3148851.
For an official policy statement about these changes, see the following Microsoft Daylight Saving Time & Time Zone Blog article:
Time Zone Updates for RussiaFor general Windows support for time zone and daylight saving time issues, go to the following Microsoft website: