From d8abecee9385bce3b549e8cfde240609741b69e0 Mon Sep 17 00:00:00 2001 From: Miro <200482516+Mirochill@users.noreply.github.com> Date: Mon, 25 May 2026 09:26:31 +0200 Subject: [PATCH] dashboard: replace deprecated utcfromtimestamp --- srt/dashboard/layouts/graphs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/srt/dashboard/layouts/graphs.py b/srt/dashboard/layouts/graphs.py index 981f549e..c0859a7c 100644 --- a/srt/dashboard/layouts/graphs.py +++ b/srt/dashboard/layouts/graphs.py @@ -5,7 +5,7 @@ """ import plotly.graph_objects as go -from datetime import datetime +from datetime import datetime, timezone import numpy as np from dash import Dash, dcc, html, Input, Output, callback import pandas as pd @@ -589,7 +589,8 @@ def generate_power_history_graph(tsys, tcal, cal_pwr, spectrum_history): power_time, power_vals = zip(*power_history) fig = go.Figure( data=go.Scatter( - x=[datetime.utcfromtimestamp(t) for t in power_time], y=power_vals + x=[datetime.fromtimestamp(t, tz=timezone.utc) for t in power_time], + y=power_vals, ), layout={ "title": "Power vs Time",