mysql에서 null을 반환하는 convert_tz에 문제가 있습니다. mysql convert_tz 명령이 NULL을 반환합니다.
mysql --version
mysql Ver 14.14 Distrib 5.6.11, for osx10.7 (x86_64) using EditLine wrapper
내가 수동
http://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html 내가이 명령을 실행 읽어 의 bash-3.2 # mysql_tzinfo_to_sql를는/usr/share/zoneinfo 표준을 | mysql -u root -p mysql 암호 입력 : 경고 : '/ usr/share/zoneinfo/+ VERSION'을 시간대로로드 할 수 없습니다. 그것을 건너 뜁니다.
Warning: Unable to load '/usr/share/zoneinfo/Asia/Riyadh87' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/Asia/Riyadh88' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/Asia/Riyadh89' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/Mideast/Riyadh87' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/Mideast/Riyadh88' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/Mideast/Riyadh89' as time zone. Skipping it.
ERROR 1406 (22001) at line 38916: Data too long for column 'Abbreviation' at row 1
그런 다음 mysql을 사용하여이 명령을 실행했습니다. SELECT CONVERT_TZ ('2004-01-01 12:00:00', 'GMT', 'EST'); null을 반환합니다. mysql.time_zone_transition_type 테이블에 GMT와 EST 항목이 있음을 확인할 수 있습니다.
'mysql_tzinfo_to_sql를는/usr/share/zoneinfo 표준과 테스트 | sed -e "s/현지 표준 시간대를 설정해야합니다 - zic 매뉴얼 페이지/local /"| mysql -u root mysql은 한 줄에서 같은 것을하는 것처럼 보입니다. 우분투에서 나를 위해 일했다 14.04. –