Setting Python timezone to be local rather than UTC


Python scripts run from Jupyter return UTC but I expect local or host time.

My host machine’s time is local and I have also run the following command:
quantrocket countdown timezone 'Australia/Sydney'

QuantRocket logging and Crontab behave as expected by reporting local/host time.

However, Python commands like datetime.now() in custom scripts still return time in UTC.

Is there a Docker container that I need to make timezone aware? I assume datetime.now() would then sync with the container and eliminate the need to set timezones using Python code.


Currently the timezone can only be set for flightlog and countdown. The intended design for custom scripts is that you would schedule the script to run at the desired time and timezone using countdown, and log the script output in the desired timezone using flightlog, but the script itself would just run when told to and wouldn’t need to worry about the time or timezone.