简体   繁体   中英

How to change ReportPortal containers timezone?

Following the installation guide , ReportPortal is successfully deployed. Everything works fine, except for one thing... Containers time zone is always UTC. My CI servers are located in UTC+3, so, for example, launch reported at 00.30 is shown on widget as yesterday's one.

Most of images are alpine based, without installed tzdata. I tried to add hosts etc/localtime as a volume ( /etc/localtime:/etc/localtime:ro ) but it doesn't help.

I've got the same result on RHEL 7 and Win 10 local machine with Docker Toolbox. Appreciate if somebody share his experience with this problem.

Solved it.

Actually, that's enough to change a timezone in api container only. Adding environment variable TZ is solving the issue. So I just added it to the docker-compose file:

api:
    image: reportportal/service-api:4.3.0
    depends_on:
      - mongodb
    environment:
      - RP_PROFILES=docker
      - JAVA_OPTS=-Xmx1g -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp
      - TZ=Asia/Jerusalem
    restart: always

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM