Export (0) Print
Expand All

Time Functions

The following functions are used with system time.

FunctionDescription
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.

FunctionDescription
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.

FunctionDescription
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.

FunctionDescription
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.

FunctionDescription
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.

FunctionDescription
QueryPerformanceCounter Retrieves the current value of the high-resolution performance counter.
QueryPerformanceFrequency Retrieves the frequency of the high-resolution performance counter.

 

The following function is used with interrupt time.

FunctionDescription
QueryUnbiasedInterruptTime Gets the current unbiased interrupt-time count. The unbiased interrupt-time count does not include time the system spends in sleep or hibernation.

 

 

 

Community Additions

ADD
Show:
© 2014 Microsoft