Skip to content

Warning due to mismatched timezone db versions is inaccurate #11

@autarch

Description

@autarch

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

Requestors:

From [email protected] (@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).

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