<@ULVA73B9P> Is the <scheduled_start_time flow run...
# marvin-in-the-wild
n
@Marvin Is the scheduled_start_time flow run attribute always in UTC or can it be in local time too depending on workspace settings or if its a scheduled/manual run?
m
The
scheduled_start_time
for a flow run in Prefect does consider timezone information. According to the Prefect Schedules documentation, if the schedule's
anchor_date
or
timezone
are provided with a Daylight Saving Time (DST)-observing timezone, then the schedule will adjust itself appropriately for DST. This means that for schedules defined with a DST-observing timezone, the scheduled start time will be in local time and will follow DST changes. For example, an hourly cron schedule will fire on every new schedule hour, not every elapsed hour, adjusting for the DST. Similarly, longer schedules like one that fires at a specific time (e.g., 9 am) every morning, will adjust for DST automatically. The scheduled start time would reflect the local time, considering DST adjustments, if specified so in the schedule settings. Otherwise, intervals of less than 24 hours will follow UTC intervals. Here is the relevant excerpt from the Prefect documentation addressing schedules and timezones:
"Daylight saving time considerations: If the schedule's
anchor_date
or
timezone
are provided with a DST-observing timezone, then the schedule will adjust itself appropriately. Intervals greater than 24 hours will follow DST conventions, while intervals of less than 24 hours will follow UTC intervals."
Therefore, the
scheduled_start_time
can be in local time if specified, taking into account workspace settings and whether it is a scheduled or manual run.