Skip to content

Commit

Permalink
fix: timezone handling for dates
Browse files Browse the repository at this point in the history
  • Loading branch information
constantinius committed Feb 16, 2023
1 parent 08fb5f5 commit 6c0e5c1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pygeofilter/backends/native/evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ def to_interval(value: MaybeInterval) -> InternalInterval:

if isinstance(value, str):
value = parse_datetime(value)
if not value.tzinfo:
value = value.replace(tzinfo=timezone.utc)

if isinstance(value, values.Interval):
low = value.start
Expand Down

0 comments on commit 6c0e5c1

Please sign in to comment.