Fix vulcan calendar offset (#113604)
* Fix offset on vulcan calendar * Combine date, time and zone into one command in vulcan calendarpull/113627/head
parent
7d58be1a6a
commit
cbe2a5883b
|
@ -111,11 +111,11 @@ class VulcanCalendarEntity(CalendarEntity):
|
|||
event_list = []
|
||||
for item in events:
|
||||
event = CalendarEvent(
|
||||
start=datetime.combine(item["date"], item["time"].from_).astimezone(
|
||||
ZoneInfo("Europe/Warsaw")
|
||||
start=datetime.combine(
|
||||
item["date"], item["time"].from_, ZoneInfo("Europe/Warsaw")
|
||||
),
|
||||
end=datetime.combine(item["date"], item["time"].to).astimezone(
|
||||
ZoneInfo("Europe/Warsaw")
|
||||
end=datetime.combine(
|
||||
item["date"], item["time"].to, ZoneInfo("Europe/Warsaw")
|
||||
),
|
||||
summary=item["lesson"],
|
||||
location=item["room"],
|
||||
|
@ -165,10 +165,10 @@ class VulcanCalendarEntity(CalendarEntity):
|
|||
)
|
||||
self._event = CalendarEvent(
|
||||
start=datetime.combine(
|
||||
new_event["date"], new_event["time"].from_
|
||||
).astimezone(ZoneInfo("Europe/Warsaw")),
|
||||
end=datetime.combine(new_event["date"], new_event["time"].to).astimezone(
|
||||
ZoneInfo("Europe/Warsaw")
|
||||
new_event["date"], new_event["time"].from_, ZoneInfo("Europe/Warsaw")
|
||||
),
|
||||
end=datetime.combine(
|
||||
new_event["date"], new_event["time"].to, ZoneInfo("Europe/Warsaw")
|
||||
),
|
||||
summary=new_event["lesson"],
|
||||
location=new_event["room"],
|
||||
|
|
Loading…
Reference in New Issue