Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 230 of file time.c.
Referenced by Phase1InitializationDiscard().
{ LARGE_INTEGER CurrentTime; NTSTATUS Status; /* Read time zone information from the registry */ Status = RtlQueryTimeZoneInformation(&ExpTimeZoneInfo); if (!NT_SUCCESS(Status)) { /* Failed, clear all data */ RtlZeroMemory(&ExpTimeZoneInfo, sizeof(TIME_ZONE_INFORMATION)); ExpTimeZoneBias.QuadPart = (LONGLONG)0; ExpTimeZoneId = TIME_ZONE_ID_UNKNOWN; } else { /* FIXME: Calculate transition dates */ /* Set bias and ID */ ExpTimeZoneBias.QuadPart = ((LONGLONG)(ExpTimeZoneInfo.Bias + ExpTimeZoneInfo.StandardBias)) * TICKSPERMINUTE; ExpTimeZoneId = TIME_ZONE_ID_STANDARD; } /* Change it for user-mode applications */ SharedUserData->TimeZoneBias.High1Time = ExpTimeZoneBias.u.HighPart; SharedUserData->TimeZoneBias.High2Time = ExpTimeZoneBias.u.HighPart; SharedUserData->TimeZoneBias.LowPart = ExpTimeZoneBias.u.LowPart; SharedUserData->TimeZoneId = ExpTimeZoneId; /* Convert boot time from local time to UTC */ KeBootTime.QuadPart += ExpTimeZoneBias.QuadPart; /* Convert system time from local time to UTC */ do { CurrentTime.u.HighPart = SharedUserData->SystemTime.High1Time; CurrentTime.u.LowPart = SharedUserData->SystemTime.LowPart; } while (CurrentTime.u.HighPart != SharedUserData->SystemTime.High2Time); /* Change it for user-mode applications */ CurrentTime.QuadPart += ExpTimeZoneBias.QuadPart; SharedUserData->SystemTime.LowPart = CurrentTime.u.LowPart; SharedUserData->SystemTime.High1Time = CurrentTime.u.HighPart; SharedUserData->SystemTime.High2Time = CurrentTime.u.HighPart; /* Return success */ return TRUE; }