Does prefect default to a certain time zone? Local...
# ask-community
j
Does prefect default to a certain time zone? Local flow runs show my local time but will that hold in production? This would be for datetime functions
k
The backend runs on UTC. The UI will render stuff in local time of your machine
j
Is there a way to set a global tz at the top using pendulum?
e.x.
Copy code
import pendulum 

use_this_everywhere = pendulum.now("US/Eastern"))'
k
you mean to use it on all Flows you ever register?
j
no, just at the top of each flow individually, sorry
but in a way that means I don't need to specify the TZ in datetime and timedelta functions
k
I can’t think of a way off the top of my head
j
No worries, that isn't too hard. What's the best way to specify a timezone? Pendulum?
k
Yes
j
can you append a specified timezone to datetime functinos?
k
if i’m right, it’s not so straightforward which is why pendulum exists
j
It looks like pendulum replaces datetime pretty well except there is a
T
right in the middle of the date which I suspect sqlalchemy is not going to like
k
I think it might cuz that is standard ISO 8601. But not sure