Skip to content

test_ancient_datetime test fails due to a timezone different than UTC #409

@mateuszmrozewski

Description

@mateuszmrozewski

Steps to reproduce:

  1. Set system timezone to something other than UTC/GMT, ie. 'Australia/Sydney'.
  2. Run the test.

Expected:
Test works

Actual:
Test fails with different times:
FAILED tests/test_logical_types.py::test_ancient_datetime - assert datetime.date...0, 1, 1, 0, 0) == datetime.date...12, 31, 14, 0)

The test seems to try to go around it, but From Python documentation about datetime.replace() method:

Note that tzinfo=None can be specified to create a naive datetime from an aware datetime with no conversion of date and time data.

It seems that serialization and deserialization may have an issue with timezones.

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