[Solved] - MySQL TimeZone Database Error

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Moderators, Developers

Post Reply
Author
Message
areast
Cacti User
Posts: 105
Joined: Wed Oct 29, 2014 5:08 am

[Solved] - MySQL TimeZone Database Error

#1 Post by areast » Fri Mar 09, 2018 5:03 am

Did search alot and still could not fix by myself

I done below step still not work
under php.ini
[Date]
date.timezone="Asia/Hong_Kong"

under mysql -> bin -> my.ini
[mysql]
[Date]
;Defines the default timezone used by the date functions
Date.timezone = Asia/Hong_Kong

Saw few post about "mysql_tzinfo_to_sql — Load the Time Zone Tables"
But I have no idea how to start? (is that a .sql table import to?)
Have some expert can sharp the full step how to config ?
Attachments
Untitled.png
Untitled.png (12.13 KiB) Viewed 4474 times
Last edited by areast on Sun Mar 11, 2018 9:23 pm, edited 1 time in total.

netniV
Cacti Guru User
Posts: 2983
Joined: Sun Aug 27, 2017 12:05 am

Re: MySQL TimeZone Support ERROR: Your MySQL TimeZone datab

#2 Post by netniV » Fri Mar 09, 2018 11:42 am

.
Last edited by netniV on Sat Mar 10, 2018 2:11 am, edited 1 time in total.

tertius
Cacti User
Posts: 71
Joined: Wed Mar 01, 2017 2:34 pm

Re: MySQL TimeZone Support ERROR: Your MySQL TimeZone datab

#3 Post by tertius » Fri Mar 09, 2018 7:18 pm

areast wrote: Saw few post about "mysql_tzinfo_to_sql — Load the Time Zone Tables"
But I have no idea how to start? (is that a .sql table import to?)
Have some expert can sharp the full step how to config ?
The time zone table in mysql is a different thing than setting a timezone in php.ini.
That table has to be filled with the all of the timezone information that is installed on the system. There is a program that reads this data and produces a *.sql file with INSERT INTO statements to populate that table.
The program is mysql_tzinfo_to_sql and is contained in the mysql-server package (or mariadb-server, if you use mariadb instead of mysql).
Call "man mysql_tzinfo_to_sql" to get command line parameter help. It is probably called as "mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql" to populate the table in one step, but depending on your system the directory may vary or the mysql user.

areast
Cacti User
Posts: 105
Joined: Wed Oct 29, 2014 5:08 am

Re: MySQL TimeZone Support ERROR: Your MySQL TimeZone datab

#4 Post by areast » Sun Mar 11, 2018 9:22 pm

Hi Tertius
Thanks for explain

I did solve "MySql timezone" with below step

http://www.geeksengine.com/article/popu ... mysql.html

Download the "timezone_2018c_posix" and paste under MySql -> Data

Post Reply