yobasystems / alpine-mariadb

MariaDB running on Alpine Linux [Docker]
https://hub.docker.com/r/yobasystems/alpine-mariadb/
242 stars 72 forks source link

Timezone ? #33

Closed meandus closed 4 years ago

meandus commented 5 years ago

Hi,

impossible to change TZ on docker-compose using environnement variable:

environment:
  MYSQL_ROOT_PASSWORD: docker
  MYSQL_DATABASE: docker
  MYSQL_USER: docker
  MYSQL_PASSWORD: docker
  **TZ: "Europe/Paris"**

How is it possible to do this action ?

dominictayloruk commented 5 years ago

Yes this is possible, let me have a look.

More information is here https://mariadb.com/kb/en/library/time-zones/

dominictayloruk commented 5 years ago

Try using an offset like +5:00 or -9:00

Also check the host has the correct timezone as it should get this info from the system.

dominictayloruk commented 5 years ago

Failing all of that you would need to edit the run command and add --default-time-zone='Europre/Paris'

exec /usr/bin/mysqld --user=mysql --console --skip-name-resolve --skip-networking=0 --default-time-zone='Europre/Paris'

ekiel commented 4 years ago

is it possible to have this in a docker-compose variable?