Skip to content

Add localtime - #55

Open
PQCraft wants to merge 1 commit into
XboxDev:nxdkfrom
PQCraft:nxdk
Open

Add localtime#55
PQCraft wants to merge 1 commit into
XboxDev:nxdkfrom
PQCraft:nxdk

Conversation

@PQCraft

@PQCraft PQCraft commented Jul 25, 2023

Copy link
Copy Markdown

This implementation calls GetTimeZoneInformation from <winapi/timezoneapi.h>, offsets the time from the input by the output of GetTimeZoneInformation, passes it to gmtime, and returns the result from gmtime.

I have verified that it does work correctly if it can't get the timezone or daylight savings is disabled, if it is daylight savings, and if it is not daylight savings. It also returns NULL if GetTimeZoneInformation returns TIME_ZONE_ID_INVALID.

This makes a call to GetTimeZoneInformation in winapi/timezoneapi.h, offsets the time given by the output of GetTimeZoneInformation, passes it to gmtime, and returns the result from gmtime.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant