Bug 15376 – The time zone name conversions should not be compiled into Phobos

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-11-23T03:20:00Z
Last change time
2016-03-19T20:22:25Z
Assigned to
nobody
Creator
issues.dlang

Comments

Comment #0 by issues.dlang — 2015-11-23T03:20:08Z
As it stands, every time that Microsoft changes the list of time zones that they have, tzDatabaseNameToWindowsTZName and windowsTZNameToTZDatabaseName in std.datetime have to be updated, and it's proven to be a maintenance problem (not to mention that it means that older releases won't work properly with Windows machines that have been properly updated). So, we should introduce a way to get those conversions at runtime rather than compile time (presumably by reading in the windowsZones.xml file that the conversions come from in the first place) and then deprecate tzDatabaseNameToWindowsTZName, windowsTZNameToTZDatabaseName, and TimeZone.getTimeZone.
Comment #1 by issues.dlang — 2015-11-23T03:28:52Z
Comment #2 by github-bugzilla — 2016-01-23T14:06:03Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/635cecee557bf5e82b2f614dd19e41383505c3f7 Fix for issue# 15376. Get time zone conversions at runtime. It's proven to be a maintenance problem to maintain the time zone conversions between the IANA TZ database names and the Windows time zone names in std.datetime. So, rather than compiling them in, this provides a way to get them at runtime (which will also make it so in the future, older releases can work properly on up-to-date Windows boxes, which is not the case currently with regards to time zone conversions). The current conversion functions can be deprecated after parseTZConversions has been out for a release (so that it's possible for users to compile their code for two releases in a row without getting deprecation messages). https://github.com/D-Programming-Language/phobos/commit/6be2087858765bdf8b3439ba9cfc4fc2d5e543a7 Merge pull request #3824 from jmdavis/issue15376 Fix for issue# 15376. Get time zone conversions at runtime.
Comment #3 by issues.dlang — 2016-02-08T02:54:08Z
Technically, removing the functions with the hard-coded conversions would be what's required to fix this bug per its title, but the new functionality is in place now, and the old functionality will be deprecated after the new functionality has been out for a release and eventually removed with the completion of the deprecation cycle, so I'm going to mark this as fixed.
Comment #4 by github-bugzilla — 2016-03-19T20:22:25Z