Iain Dillingham
09/17/2020, 1:53 PMprefect.context.scheduled_start_time
contains slightly different timezone information depending on whether I run the flow with my_flow.run()
or whether it is run by the Docker agent.
• Run with my_flow.run()
the object as follows: DateTime(2020, 9, 17, 13, 28, 18, 669528, tzinfo=Timezone('UTC')
.
• Run by the Docker agent the object is as follows: DateTime(2020, 9, 17, 13, 45, 0, tzinfo=Timezone('+00:00'))
.
The distinction is important because they are both instances of pendulum.DateTime
. Calling <http://dt.to|dt.to>_iso8601_string()
results in a different string, because if the timezone is UTC, then this method replaces the trailing +00:00
with Z
. Whether or not this is a good idea, it would be good for prefect.context.scheduled_start_time
to return consistent timezone information.Dylan
Iain Dillingham
09/17/2020, 3:29 PMdatetime.datetime
with a timezone of datetime.timezone.utc
is making its way to IntervalClock
. I'm not sure whether that's in my application code, in Prefect, or somewhere else. I'll try and investigate further.prefect.context.scheduled_start_time
is wrong, as much as the same timezone having a different representation depending on the environment (Docker/non-Docker).Dylan