#ifndef _NTRTL_H
#if (PHNT_VERSION >= PHNT_WINDOWS_10_21H2)
/**
* The RtlGetSystemTimeAndBias routine returns the current system time together with the current time zone bias and the effective range of that bias.
*
* \param TimeZoneBias A pointer to a variable that receives the current time zone bias, in 100-nanosecond intervals.
* \param TimeZoneBiasEffectiveStart An optional pointer to a variable that receives the time at which the current bias became effective.
* \param TimeZoneBiasEffectiveEnd An optional pointer to a variable that receives the time at which the current bias ceases to be effective.
* \return ULONGLONG The current system time, in 100-nanosecond intervals since January 1, 1601 (UTC).
*/
NTSYSAPI
ULONGLONG
NTAPI
RtlGetSystemTimeAndBias(
_Out_ PLARGE_INTEGER TimeZoneBias,
_Out_opt_ PLARGE_INTEGER TimeZoneBiasEffectiveStart,
_Out_opt_ PLARGE_INTEGER TimeZoneBiasEffectiveEnd
);
View code on GitHubThis function atomically retrieves the current system time as well as the time-zone bias in effect at that exact point in time and that is necessary to compute the local time.
The function also optionally returns the dates when the daylight saving time starts and ends in the current region.