-
Notifications
You must be signed in to change notification settings - Fork 25
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
Unix systems without /etc/localtime #21
Comments
On first glance, this seems relatively sane and its certainly easy to change and document. My one concern is that the existing behavior has been there for so long that someone might be relying on it. OTOH, I regularly get bug reports and complaints about this. On yet another hand, I suspect that in many cases there is a local time zone that this module can't detect. If, for example, your Now, having a system with |
On my Ubuntu 17.04 on WSL system, /etc/localtime exists but is not a symlink; so although It’s worth noting that /etc/localtime doesn’t actually match any standard timezone and it has the weird name “STD” which is defined properly as GMT+1000, but it’s not actually Australia/Melbourne which is the time zone I am in. I presume that there is something that keeps it in sync with the Windows side, though I doubt this is anything special to WSL. (I dunno, maybe it pretends it’s a hardware clock that knows what it’s doing? Is there such a thing? How do virtualisation platforms do it?) As it stands, this is breaking things like the Dist::Zilla tests for me. My workaround was to set the environment variable |
Just got a round of cpantesters failures due to this issue. A couple examples (including some from @eserte):
I like that it gets tested in different time zones, so I wouldn't want to globally set |
One thing I would recommend is not trying to use the user's local time zone in tests for distros that aren't |
On a CentOS 6 system without /etc/localtime or something else configured I would expect that
DateTime::TimeZone::Local
returns "UTC" as the time zone, like system'sdate
:However the output is:
I think as the last fallback the module can simply return "UTC". I checked other systems (Debian jessie, Debian stretch, Ubuntu 16.04, CentOS 7, FreeBSD 10.3) --- on all these systems
date
outputsUTC
if/etc/localtime
is missing.The text was updated successfully, but these errors were encountered: