Hello all, I´m facing an issue that I´m not able t...
# prefect-server
r
Hello all, I´m facing an issue that I´m not able to fix easily…`RuntimeError: Unable to find any timezone configuration`
a
I believe you should be able to set your timezone the same way in Server:
👍 1
r
I´m assuming it is happening inside the dask cluster. Dask scheduler and worker are running in alpine docker containers that have tzdata installed. I´ve checked in all the ec2 and containers and all of them are showing date accordingly. I´m not sure what else I can do for fixing this.
a
I think as long as you set it in the UI, this should adjust your timezone in the backend. LMK if that’s not the case
r
I think I can´t in my prefect server ui
k
I have encountered this for non-Prefect related stuff. I don’t know when it happens but it can be fixed by adding the TZ env variable globally in the container. Or you can do it through a Python script:
Copy code
os.environ['TZ'] = 'Europe/London'
Link
👍 2
r
mmm let me check that out!
k
Basically all of the time-based libraries will look for the default timezone of the system and in this case they are unable to
You can install tzdata also like mentioned
r
yep, it is already installed
I´m going to try to set it during container creation
just by doing this inside worker container fix the issue ->
cp /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone
k
That would be nice to comment in this issue. Do you want me to?
r
this is only for alpine based containers, for container should be ->
Copy code
ENV TZ UTC
RUN cp /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
I can do it! no problem
k
Thank you!
r
Thanks to you too!