Skip to content

Use UTC datetimes.#37

Merged
xsedla1o merged 4 commits intomasterfrom
utc_datetime
Apr 7, 2026
Merged

Use UTC datetimes.#37
xsedla1o merged 4 commits intomasterfrom
utc_datetime

Conversation

@xsedla1o
Copy link
Copy Markdown
Collaborator

@xsedla1o xsedla1o commented Mar 30, 2026

This PR addresses two issues:

  • improper usage of local tz-naive dates, mixed with usage of utc tz-naive dates.
  • usage of tz-naive dates to represent UTC timestamps via utcnow(), which was deprecated in python3.12

Before this change, some timestamps were set by datetime.now(), even though DP3 implicitly assumes UTC time from all its input modules. The outputs were also implicitly converted UTC, but tz-naive, which needed extra handling to work.

@xsedla1o xsedla1o requested a review from dbnk0 March 30, 2026 14:28
xsedla1o added 4 commits April 1, 2026 14:06
Use timezone-aware date wherever possible,
else `datetime.utcnow()`.
Converts the remaining parts of DP3 to use tz-aware datetimes.
BREAKING: The API date output is now in UTC, RFC 3339 format.
Copy link
Copy Markdown
Collaborator

@dbnk0 dbnk0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great changes!
LGTM

@xsedla1o xsedla1o merged commit a90a006 into master Apr 7, 2026
4 checks passed
@xsedla1o xsedla1o deleted the utc_datetime branch April 7, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants