-
Notifications
You must be signed in to change notification settings - Fork 2.2k
How to set the mysql timezone info? #320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'd recommend setting the $ docker run -it --rm mysql:5.7 date
Thu Aug 24 16:46:59 UTC 2017
$ docker run -it --rm -e TZ='America/Los_Angeles' mysql:5.7 date
Thu Aug 24 09:47:08 PDT 2017 (which, according to https://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html, the |
@tianon Thanks, this can solve my problem. |
you can set it here docker-compose.yml mysqldb:
#image: mysql:5.7.21
build: .
#container_name: mysql_container
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=root
- TZ=Europe/Sofia https://stackoverflow.com/questions/49959601/configure-time-zone-to-mysql-docker-container |
When i start up the mysql container use the command like this:
And when i run the date command in the container, it is the GMT time.
The text was updated successfully, but these errors were encountered: