Setting timezone in circle 2

circle.yml

#1

I used the following to set the timezone in circle.yml:

version: 2
executorType: docker
environment:
  TZ: "/usr/share/zoneinfo/America/Los_Angeles"
containerInfo:
  - image: suchitagarwal/spoke:1.3.5
  - image: mongo:3.2.10
stages:

However, in my tests, when I retrieve the current timezone, it still says UTC. Am I missing something?


#2

The last comment here seems useful.

Also, you may want to review the configuration reference in CircleCI Docs as this config has a lot wrong with it.


#3

For us it was adding this step:

- run:
      name: Switch timezone to Melbourne
      command: sudo cp /usr/share/zoneinfo/Australia/Melbourne /etc/localtime

#4

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.