Closed peter-slovak closed 6 years ago
I don't remember why exactly but I think I remember there being an issue specific to Docker.. Perhaps /etc/timezone
inside the container depends on who buile the image rather than the system where the container runs? It was something like that.. Anyway, I am not opposed to allowing "+00:00" be overridden by a MYSQL_DEFAULT_TIME_ZONE
environment variable. Would you like to try this and submit a PR?
You're right, unless you set the timezone in your Dockerfile, it's determined by the parent image - in that case, "+00:00" is a sensible default. I'll look into the PR soon :+1:
It would be great to be able to set
--default-time-zone
either via an environment variable (e.g. the commonly usedTZ
if we had populated the timezone tables, or a more specific one likeMYSQL_DEFAULT_TIME_ZONE
).Currently, this option is not overridable in my.cnf because the CLI arguments take precedence. The only way to use other time zone is appending
--default-time-zone=...
torun
command, which only works because it overwrites the previously declared argument--default-time-zone="+00:00"
.Is there any reason why you don't keep the default
SYSTEM
timezone? Am I missing something?