Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions appdaemon/adapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2971,7 +2971,10 @@ async def run_at(
info = await self.AD.sched._parse_time(start, self.name)
start = info["datetime"]
case dt.time():
start = dt.datetime.combine(await self.date(), start).astimezone(self.AD.tz)
if start.tzinfo is None:
start = start.replace(tzinfo=self.AD.tz)
date = await self.date()
start = dt.datetime.combine(date, start)
case dt.datetime():
...
case _:
Expand Down Expand Up @@ -3056,8 +3059,10 @@ async def run_daily(
info = await self.AD.sched._parse_time(start, self.name)
start, offset, sun = info["datetime"], info["offset"], info["sun"]
case dt.time():
if start.tzinfo is None:
start = start.replace(tzinfo=self.AD.tz)
date = await self.date()
start = dt.datetime.combine(date, start).astimezone(self.AD.tz)
start = dt.datetime.combine(date, start)
case dt.datetime():
...
case _:
Expand Down Expand Up @@ -3301,8 +3306,10 @@ def timed_callback(self, **kwargs): ... # example callback
info = await self.AD.sched._parse_time(start, self.name)
start = info["datetime"]
case dt.time():
if start.tzinfo is None:
start = start.replace(tzinfo=self.AD.tz)
date = await self.date()
start = dt.datetime.combine(date, start).astimezone(self.AD.tz)
start = dt.datetime.combine(date, start)
case dt.datetime():
...
case None:
Expand Down
Loading