Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.11.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

timezone in a docker installation

Hello,

I have installed ocs inventory 2.9.2 using Docker (compose version)

Everything works except for timezone.

I have set an extra env varable in docker-compose.yml

environment:
      OCS_DB_SERVER: ocsinventory-db
      OCS_DB_USER: ..........
      OCS_DB_PASS: ..........
      OCS_DB_NAME: ocsweb
      # See documentation to set up SSL for MySQL
      OCS_SSL_ENABLED: 0
      TZ: Europe/Rome

But the time showed in last inventory is still UTC

The docker host has correct timezone (and time)

The thing that I do not understand is that in documentation is written that default timezone is Europe/Paris that is the same of Europe/Rome where I am so it should have been working also in default settings.

Thank you for any help.

Nicola

in OCS Inventory NG server for Unix by (330 points)

2 Answers

0 votes
 
Best answer

Hello,

I was having the same problem but have now managed to solve it. It turns out that the `TZ` variable needs to be set for both the `ocsapplication`and `ocsdb` container:

```

ocsapplication:
  environment:
    TZ: UTC   


ocsdb :
  environment:
    TZ: UTC

``` 

After changing `docker-compose.yml` for this, you will need to rebuild the images 

```

docker compose up --build

```

Good luck!

by (440 points)
selected by
0 votes
The problem is still there anyone can answer please?

Thank

Nicola
by (330 points)
 
Powered by Question2Answer
...