File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
src/frequenz/client/reporting Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 77## Upgrading
88
99* The CLI tool is moved to dedicated folder.
10+ * Timestamps of aggregated (formula) requests are now timezone-aware.
1011
1112<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->
1213
Original file line number Diff line number Diff line change @@ -164,7 +164,9 @@ class AggregatedMetric:
164164 def sample (self ) -> MetricSample :
165165 """Return the aggregated metric sample."""
166166 return MetricSample (
167- timestamp = self ._data_pb .sample .sampled_at .ToDatetime (),
167+ timestamp = self ._data_pb .sample .sampled_at .ToDatetime ().replace (
168+ tzinfo = timezone .utc
169+ ),
168170 microgrid_id = self ._data_pb .aggregation_config .microgrid_id ,
169171 component_id = self ._data_pb .aggregation_config .aggregation_formula ,
170172 metric = self ._data_pb .aggregation_config .metric ,
You can’t perform that action at this time.
0 commit comments