edgexfoundry / edgex-compose

EdgeX Foundry Docker Compose release compose files and tools for building EdgeX compose files
Apache License 2.0
82 stars 119 forks source link

Configure services to use the same timezone as the host #393

Closed jackchenjc closed 1 year ago

jackchenjc commented 1 year ago

πŸš€ Feature Request

Relevant Package [REQUIRED]

This feature request is for the docker compose files enhancement ### Description [**REQUIRED**] By default, docker containers are using UTC time zone which may leads to inconsistent time zone problem between services and host in some services, e.g. support-scheduler. ### Describe the solution you'd like Set a "volumes" prop for each service to run the docker container with host timezone. ``` volumes: # use host timezone - /etc/localtime:/etc/localtime:ro ``` ### Describe alternatives you've considered N/A
cloudxxx8 commented 1 year ago

it will help the log time to use the host system timezone

lenny-goodell commented 1 year ago

Based on my searching we should also mount.

- "/etc/timezone:/etc/timezone:ro"
jackchenjc commented 1 year ago

Hi Lenny,

It seems that there might be cases where the /etc/timezone file is not present by default in certain operating systems, such as macOS and CentOS.

lenny-goodell commented 1 year ago

@jackchenjc , Thanks for the info.