mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 00:37:13 +00:00
Change .now() to .utcnow() (#22233)
ephem works in UTC time, not local time. As a result, our comparison needs to be in UTC for accurate results.
This commit is contained in:
parent
72bb94de96
commit
bc85d47878
@ -130,5 +130,5 @@ class Season(Entity):
|
||||
|
||||
def update(self):
|
||||
"""Update season."""
|
||||
self.datetime = datetime.now()
|
||||
self.datetime = datetime.utcnow()
|
||||
self.season = get_season(self.datetime, self.hemisphere, self.type)
|
||||
|
Loading…
x
Reference in New Issue
Block a user