I am working on a MySQL 5.7.41-44 instance running on a CentOS server.
The Linux timezone (per timedatectl
) is America/Curacao (AST, -0400)
.
The MySQL @@system_time_zone
returns AST
(and not America/Curacao
).
The problem is that AST
is not defined in the OS's zoneinfo files nor in MySQL's timezone tables, but 'America/Curacao` is.
Because MySQLs @@system_time_zone
returns a timezone which isn't in the timezone tables, functions like CONVERT_TZ([somedatetime], [fromTimeZone], @@system_time_zone)
do not work.
As far as I can tell, nothing timezone-related is being explicitly set in the MySQL config (and nothing specified in the startup command), so I am under the assumption that it is pulling @@system_time_zone
from the OS.
Assuming that the host OS server's timezone can't be changed, how can I resolve this?
I guess either I need AST
in the timezone tables in a best-practice way, OR, force mySQL to pick up the Olson timezone version (America/Curacao
in this case), but I am unsure how to achieve that.
default-time-zone='America/Curacao'
in the [mysqld] section in my.cnf ?