Skip to content

Unix systems without /etc/localtime #21

Description

@eserte

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's date:

$ date
Sat Jun 24 11:42:12 UTC 2017

However the output is:

$ perl5.24.1 -MDateTime::TimeZone::Local -e 'warn DateTime::TimeZone::Local->TimeZone()'
Cannot determine local time zone

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 outputs UTC if /etc/localtime is missing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions