Skip to content

Extra second prior to Dec 13, 1901 #152

@elidchan

Description

@elidchan
>>> Pendulum(1901, 12, 13, 0, 0, 9, 555555, 'US/Central')
<Pendulum [1901-12-13T00:00:10.555555-06:00]>

Notice the 9 seconds became 10 seconds.

Dates after December 13, 1901 don't have this issue:

>>> Pendulum(1901, 12, 14, 0, 0, 9, 555555, 'US/Central')
<Pendulum [1901-12-14T00:00:09.555555-06:00]>

This issue seems to be dependent upon the microseconds term:

>>> Pendulum(1901, 12, 13, 0, 0, 9, 0, 'US/Central')
<Pendulum [1901-12-13T00:00:09-06:00]>

It also seems to be dependent upon the time zone:

>>> Pendulum(1901, 12, 13, 0, 0, 9, 555555, 'UTC')
<Pendulum [1901-12-13T00:00:09.555555+00:00]>

December 13, 1901 seems to correspond with the minimum value of a 32-bit signed integer:
https://www.drupal.org/node/1708296

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions