mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 19:23:34 +00:00
Use tzinfo in time constructor instead of astime for iot devices (#1158)
Fixes using `astime` on a non tzinfo aware object which causes issues with daylight saving.
This commit is contained in:
parent
7c1686d3ae
commit
bd5a24b0ed
@ -37,8 +37,9 @@ class Time(IotModule):
|
||||
res["hour"],
|
||||
res["min"],
|
||||
res["sec"],
|
||||
tzinfo=self.timezone,
|
||||
)
|
||||
return time.astimezone(self.timezone)
|
||||
return time
|
||||
|
||||
@property
|
||||
def timezone(self) -> tzinfo:
|
||||
|
Loading…
Reference in New Issue
Block a user