Skip to content

Bug in date representation within leap second #21

@taldcroft

Description

@taldcroft

I suspect this might be a bug in Axtime3.

In [4]: DateTime('2015-06-30 23:59:60.5').date  # WRONG
Out[4]: '2015:182:00:00:00.500'

In [5]: DateTime('2015-06-30 23:59:60.5').secs  # CORRECT
Out[5]: 552096067.684

In [6]: DateTime(DateTime('2015-06-30 23:59:60.5').secs).date  # CORRECT (??)
Out[6]: '2015:181:23:59:60.500'

In [7]: DateTime('2015-07-01 00:00:00.5').secs  # CORRECT
Out[7]: 552096068.684

In [8]: DateTime('2015-07-01 00:00:00.5').date  # CORRECT
Out[8]: '2015:182:00:00:00.500'

In [9]: DateTime(DateTime('2015-07-01 00:00:00.5').secs).date
Out[9]: '2015:182:00:00:00.500'

In [10]: DateTime('2012-06-30 23:59:60.5').date
Out[10]: '2012:183:00:00:00.500'

Similar behavior is seen in the 2012-06-30 leap second. CxoTime does not show this problem. :-)

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