Skip to content

pytz.exceptions.AmbiguousTimeError raised with certain date times formats #1577

@fredkingham

Description

@fredkingham
 from opal.core import serialization
 serialization.deserialize_datetime("29/10/2017 01:00:00")

raises AmbiguousTimeError: 2017-10-29 01:00:00

Solutions are
a) include tz in the datetime input format
b) change the timezone.make_aware call to timezone.make_aware(a, timezone.get_current_timezone(), is_dst=False)

I think we should go with b for the time being.

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