I see many comments in the support mailing-list that people get the "Cannot determine local time zone" error on Windows. All the errors are reported against old version of DateTime and DateTime::TimeZone and so we should bump the min requirements for both modules. The DateTime::TimeZone changelog has: 1.07 2009-12-24 - Fixed for local time zone determination on Win32. Our tests broke after the December 2009 Cumulative Time Zone Update from Microsoft. Also, the DateTime changelog has: 0.54 2010-03-14 - Bumped the DateTime::TimeZone prereq to 1.09 to force people to use a modern version. Previously the minimum version was 0.59, and there have been a lot of bug fixes since then. 0.58 2010-06-28 - Versions 0.56 and 0.57 did not build XS properly when installing. 0.64 2010-10-25 * All the constructors besides new() ended up calling new(), which meant that these constructors went through the parameter validation code twice. Avoiding this should make everything that constructs a new object (besides new() itself) a little faster. So DateTime 0.54 depends on DateTime::TimeZone 1.09, which contains fixes for Windows. But 0.56 and 0.57 are broken and should be skipped. As 0.64 has an interesting perf improvement to create DateTime objects, it seems to be a reasonable candidate. And instead of 1.07, we should require 1.09 for DateTime::TimeZone as that's the version required by DateTime. Unfortunately, RHEL5 has: perl-DateTime-0.5300-2.el5.rf.i386 perl-DateTime-TimeZone-1.08-1.el5.rf.noarch Same for RHEL6. Both are lower than what I suggested above, and maybe it's not fine to bump the requirements for Bugzilla 4.4. Or we could check the OS as we already do and require these newer versions on Windows only. CC'ing Thorsten as he may know better than me which versions exactly fix the problem mentioned above on Windows.
(In reply to Frédéric Buclin from comment #0) > Both are lower than what I suggested above, and maybe it's not fine to bump > the requirements for Bugzilla 4.4. Or we could check the OS as we already do > and require these newer versions on Windows only. Ubuntu 12.04 LTS delivers 0.70 but with a dependency on Perl >= 5.14.2, maybe the newer packages won't even work with an older/to old Perl which makes it even less likely that the requirements for Bugzilla can be fulfilled with older RHEL releases like your mentioned? Fixing this only for Windows where the issue occurs sounds like a good way to go, as at least with ActiveState Perl one doesn't even get older Perls anymore. > CC'ing Thorsten as he may know better than me which versions exactly fix the > problem mentioned above on Windows. No, sorry, we fixed comparable issues of other modules by setting TZ=CET1CEST as environment variable or stuff like that and didn't ran into this problem with DateTime. Our only Windows Server which hosts Bugzilla runs Perl 5.14 as I do for development, therefore this is no problem for me anymore. http://search.cpan.org/~sbeck/Date-Manip-5.54/lib/Date/Manip.pod#TIME_ZONES
It seems the root cause has been tracked here: https://rt.cpan.org/Public/Bug/Display.html?id=92631 and in bug 604942. There was a taint issue in DateTime::TimeZone: "When running in taint mode (which Bugzilla does), reading from /etc/timezone results in a tainted time zone name. When this makes its way to the DateTime::TimeZone constructor, the string in $real_class is tainted, and the line: eval "require $real_class" fails." This problem has been fixed in DateTime::TimeZone 1.64, which has been released on February 7, 2014. This version is very recent, and we cannot require it for 4.4, but we definitely can for 5.0. While we are on it, DateTime 0.75, released on June 11, 2012, fixed a compilation warning when using Perl 5.17 or newer. As Perl 5.18 has already been released, I suggest to require this version as well.
Created attachment 8420525 [details] [diff] [review] patch, v1
Assignee: installation → LpSolit
Status: NEW → ASSIGNED
Attachment #8420525 - Flags: review?(dkl)
Summary: Bump minimum requirement for DateTime and DateTime::TimeZone to work correctly on Windows → Bump minimum requirement for DateTime and DateTime::TimeZone to correctly detect the local timezone
Assignee: LpSolit → installation
Status: ASSIGNED → NEW
Comment on attachment 8420525 [details] [diff] [review] patch, v1 Review of attachment 8420525 [details] [diff] [review]: ----------------------------------------------------------------- r=dkl
Attachment #8420525 - Flags: review?(dkl) → review+
These values also appear in the documentation: docs/bugzilla.ent docs/en/html/Bugzilla-Guide.html docs/en/html/installation.html docs/en/html/installation.html docs/en/txt/Bugzilla-Guide.txt docs/en/xml/bugzilla.ent does it need to be updated?
(In reply to Stephen Ostermiller from comment #5) > does it need to be updated? No, they are generated automatically. dkl: please don't forget to request approval if you don't want contributions to be lost.
Writing objects: 100% (5/5), 705 bytes | 0 bytes/s, done. Total 5 (delta 4), reused 0 (delta 0) To ssh://email@example.com/bugzilla/bugzilla.git f3a176d..15b70d2 master -> master
Assignee: installation → LpSolit
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Added to relnotes for 5.0rc1.
You need to log in before you can comment on or make changes to this bug.