Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
## Upgrading

* The CLI tool is moved to dedicated folder.
* Timestamps of aggregated (formula) requests are now timezone-aware.

<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->

Expand Down
4 changes: 3 additions & 1 deletion src/frequenz/client/reporting/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ class AggregatedMetric:
def sample(self) -> MetricSample:
"""Return the aggregated metric sample."""
return MetricSample(
timestamp=self._data_pb.sample.sampled_at.ToDatetime(),
timestamp=self._data_pb.sample.sampled_at.ToDatetime().replace(
tzinfo=timezone.utc
),
microgrid_id=self._data_pb.aggregation_config.microgrid_id,
component_id=self._data_pb.aggregation_config.aggregation_formula,
metric=self._data_pb.aggregation_config.metric,
Expand Down
Loading