Time zone in server and runners

How does one set the time zone inside the drone server container or the runner containers? It seems that the server is using UTC, while we are in the EDT time zone.:

> docker exec drone date
Tue Jun  2 14:44:50 UTC 2020
> date
Tue Jun  2 10:44:51 EDT 2020

Hence the nightly builds are run at the end of the afternoon instead of in the middle of the night, and the time stamps in the logs do not correspond to the creation time on the artifacts left in the file system.

Is there a way to set the timezone in the container to match that of the host machine?


Drone uses a third party cron package that recently added support for timezones:

CRON_TZ=Asia/Tokyo 0 6 * * ?

However, I am not sure if Drone is using a recent enough version of the package to support the above timezone syntax.

Thanks for you reply.

In the end, is added this to the ‘docker run’ commands starting the server and the runners:

--volume=/usr/share/zoneinfo:/usr/share/zoneinfo:ro \
--volume=/etc/localtime:/etc/localtime:ro \

This way the containers have the same time zone as the host.