Skip to content

Commit

Permalink
refactor: Default to UTC when parsing dates without a known timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Aug 22, 2024
1 parent b619b0d commit 03c8472
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion singer_sdk/streams/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def _parse_datetime(self, value: str) -> datetime.datetime: # noqa: PLR6301

# Ensure datetime is timezone-aware
if not result.tzinfo:
result = result.astimezone()
result = result.replace(tzinfo=datetime.timezone.utc)

return result

Expand Down

0 comments on commit 03c8472

Please sign in to comment.