Skip to content

Inconsistency with floating's support for 23:59:60 #103

@ikegami

Description

@ikegami

One would not expect different behaviours from the following snippets:

$ perl -MDateTime -e'
   CORE::say
      DateTime
         ->new(
            year      => 2012,
            month     =>    6,
            day       =>   30,
            hour      =>   23,
            minute    =>   59,
            second    =>   60,
            time_zone => "UTC",
         )
            ->set_time_zone("floating");
'
2012-06-30T23:59:60

$ perl -MDateTime -e'
   CORE::say
      DateTime
         ->new(
            year      => 2012,
            month     =>    6,
            day       =>   30,
            hour      =>   23,
            minute    =>   59,
            second    =>   60,
            time_zone => "floating",
         );
'
Invalid second value (60)
 at -e line 1.

This inconsistency causes DateTime::Format::Strptime to fail.

https://stackoverflow.com/q/60836745/589924

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