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

More missing US time zone aliases and correct Mountain Standard Time #19

Merged
merged 1 commit into from
Apr 30, 2019
Merged

Conversation

vais
Copy link
Contributor

@vais vais commented Apr 30, 2019

Sorry I didn't catch this problem until after the 1.2 release :(

@jmettraux
Copy link
Member

@vais Thanks a lot, I will merge and release 1.2.1.

Do you have a list of those Windows timezones? It seems the ones from

# https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones
# https://support.microsoft.com/en-ca/help/973627/microsoft-time-zone-index-values
# https://ss64.com/nt/timezones.html
are incomplete then.

@jmettraux jmettraux merged commit 1da963d into floraison:master Apr 30, 2019
@jmettraux jmettraux self-assigned this Apr 30, 2019
@vais
Copy link
Contributor Author

vais commented May 1, 2019

@jmettraux it's not that they are incomplete, it's more like the approach currently used seems to be fundamentally flawed, unfortunately, - i.e. using Time#zone which returns a human-readable description of a time zone as a key into the ZONE_ALIASES lookup table.

The reason it's flawed is because there does not seem to be any guarantees as to what these time zone descriptions will be on any given machine/windows version/international locale combination. These descriptions are stored in the Windows registry (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones), and, at least judging by this, they would even be localized according to the current user default UI language (but I have not actually tried this).

I've only done very limited research on this, and I'm in no way an expert on the subject, but here is what I've got so far: it looks like Ruby on Windows uses (here) GetTimeZoneInformation function, which uses the TIME_ZONE_INFORMATION structure, which brings us to the remarks regarding time zone descriptions being stored in the Windows registry, etc.

@jmettraux
Copy link
Member

@vais Thanks a ton!

@vais
Copy link
Contributor Author

vais commented May 3, 2019

No, @jmettraux, thank you for rufus-scheduler! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants