Skip to content

Convert timestamp to UTC#132

Merged
matthias-wende-frequenz merged 1 commit into
frequenz-floss:v0.x.xfrom
matthias-wende-frequenz:ts_utc
Apr 23, 2025
Merged

Convert timestamp to UTC#132
matthias-wende-frequenz merged 1 commit into
frequenz-floss:v0.x.xfrom
matthias-wende-frequenz:ts_utc

Conversation

@matthias-wende-frequenz
Copy link
Copy Markdown
Contributor

@matthias-wende-frequenz matthias-wende-frequenz commented Apr 22, 2025

No description provided.

Copilot AI review requested due to automatic review settings April 22, 2025 20:25
@matthias-wende-frequenz matthias-wende-frequenz requested a review from a team as a code owner April 22, 2025 20:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request converts timestamp handling to UTC by introducing a new helper function.

  • Added dt_to_pb_timestamp_utc that validates timezone-aware datetime objects and converts them to UTC.
  • Replaced existing calls to dt_to_pb_timestamp with the new UTC-aware function.
Comments suppressed due to low confidence (1)

src/frequenz/client/electricity_trading/_client.py:1023

  • Since 'datetime' is imported directly from the datetime module, consider using 'datetime' instead of 'datetime.datetime' for the isinstance check.
if not isinstance(dt, datetime.datetime):

Comment thread src/frequenz/client/electricity_trading/_client.py Outdated
@matthias-wende-frequenz matthias-wende-frequenz added the cmd:skip-release-notes It is not necessary to update release notes for this PR label Apr 22, 2025
@matthias-wende-frequenz matthias-wende-frequenz force-pushed the ts_utc branch 3 times, most recently from 1a75041 to bff51d9 Compare April 22, 2025 20:44
Signed-off-by: Matthias Wende <matthias.wende@frequenz.com>
Copy link
Copy Markdown

@micaebe micaebe left a comment

Choose a reason for hiding this comment

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

lgtm

@matthias-wende-frequenz matthias-wende-frequenz added this pull request to the merge queue Apr 23, 2025
@matthias-wende-frequenz matthias-wende-frequenz added this to the v1.0.0 milestone Apr 23, 2025
Merged via the queue into frequenz-floss:v0.x.x with commit ee662d4 Apr 23, 2025
5 checks passed
@matthias-wende-frequenz matthias-wende-frequenz deleted the ts_utc branch April 23, 2025 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmd:skip-release-notes It is not necessary to update release notes for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants