#ifndef _NTRTL_H
#if (PHNT_VERSION >= PHNT_WINDOWS_10_21H2)
NTSYSAPI
ULONGLONG
NTAPI
RtlGetSystemTimeAndBias(
_Out_ PLARGE_INTEGER TimeZoneBias,
_Out_opt_ PLARGE_INTEGER TimeZoneBiasEffectiveStart,
_Out_opt_ PLARGE_INTEGER TimeZoneBiasEffectiveEnd
);
View code on GitHub#ifndef _NTRTL_H
// rev
NTSYSAPI
ULONGLONG
NTAPI
RtlGetSystemTimeAndBias(
_Out_ PLARGE_INTEGER SystemTime,
_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.