-
Notifications
You must be signed in to change notification settings - Fork 154
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
Explicitly set $ENV{TZ} in three test files. #622
Conversation
As per usage in t/plugins/nextrelease.t. When testing Build::Zilla in a FreeBSD-11 virtual machine, failures in three test files were encountered. In each case, the failure occurred when '$tzil->build;' was called in a block where the file being processed contained non-ASCII text. In each case, an exception was thrown whose text begins: "Cannot determine local time zone". This message is believed to come from DateTime::TimeZone::Local. (https://grep.metacpan.org/search?qci=&q=Cannot%20determine%20local%20time%20zone&qft=&qd=DateTime-TimeZone&f=lib%2FDateTime%2FTimeZone%2FLocal.pm) For: rjbs#586
I get the same DateTime::TimeZone::Local exception with |
I am happy to apply something but this feels a bit "kick it until it works." Perhaps a better change will be to make all DZ tests set TZ unless DateTime is able to detect the time correctly. Thoughts? |
I have never looked into the code in the Dist::Zilla test suite, but I suspect the number of files in that suite is large -- which implies changes in more than just 3 files. Also, how would you determine that DateTime is unable to detect the time correctly? Thank you very much. |
Not if it was done in Dist::Zilla::Tester. |
Sounds reasonable. |
I can no longer reproduce this problem just by attempting to install Dist::Zilla. Not sure why. But I verified the patch anyway (see the PR for details) because recent DateTime::TimeZone versions say you should be doing this regardless. |
Should've been fixed in v6.015 |
As per usage in t/plugins/nextrelease.t.
When testing Build::Zilla in a FreeBSD-11 virtual machine, failures in
three test files were encountered. In each case, the failure occurred
when '$tzil->build;' was called in a block where the file being
processed contained non-ASCII text. In each case, an exception was
thrown whose text begins: "Cannot determine local time zone". This
message is believed to come from DateTime::TimeZone::Local.
(https://grep.metacpan.org/search?qci=&q=Cannot%20determine%20local%20time%20zone&qft=&qd=DateTime-TimeZone&f=lib%2FDateTime%2FTimeZone%2FLocal.pm)
For: #586