Skip to content

Commit 28a279f

Browse files
committed
replace utcfromtimestamp
1 parent f406bc3 commit 28a279f

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

e3dc/_e3dc.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,7 @@ def poll(self, keepAlive: bool = False):
318318
"production": {"solar": solar, "add": -add, "grid": grid},
319319
"selfConsumption": sc,
320320
"stateOfCharge": soc,
321-
"time": datetime.datetime.utcfromtimestamp(ts).replace(
322-
tzinfo=datetime.timezone.utc
323-
),
321+
"time": datetime.datetime.fromtimestamp(ts, tz=datetime.timezone.utc),
324322
}
325323

326324
self.lastRequest = outObj

0 commit comments

Comments
 (0)