Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add localtime #55

Open
wants to merge 1 commit into
base: nxdk
Choose a base branch
from
Open

Add localtime #55

wants to merge 1 commit into from

Conversation

PQCraft
Copy link

@PQCraft PQCraft commented Jul 25, 2023

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