Skip to content
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

Warning due to mismatched timezone db versions is inaccurate #11

Open
autarch opened this issue Nov 12, 2016 · 0 comments
Open

Warning due to mismatched timezone db versions is inaccurate #11

autarch opened this issue Nov 12, 2016 · 0 comments

Comments

@autarch
Copy link
Member

autarch commented Nov 12, 2016

Migrated from rt.cpan.org #66097 (status was 'new')

Requestors:

From ether@cpan.org (@karenetheridge) on 2011-02-23 23:35:47:

I just updated DateTime::TimeZone today (to 1.28); there was a process
already running in the background that uses DateTime::TimeZone, and this
warning appeared in my logs:

Loaded DateTime::TimeZone::Europe::Rome, which is from an older version
(2011b) of the Olson database than this installation of
DateTime::TimeZone (2010j).

No doubt this is because using the timezone object checks the db on
disk, which was updated to a newer version than the version of the TZ
module running in memory -- so I'm not worried about the fact that I got
this warning. However, the message is inaccurate - it says "older" when
in fact this version is newer. The code reveals:

    if ( $object_version ne $catalog_version ) {
        warn
            "Loaded $real_class, which is from an older version

($object_version) of the Olson database than this installation of
DateTime::TimeZone ($catalog_version).\n";
}

This is an equality check, rather than a gt/lt comparison. I would
suggest either altering the error message to say "from a different
version", or not warning at all if the db is newer than the code (I'm
not sure if it is useful to warn in this case or not).

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

No branches or pull requests

1 participant