Skip to content

Commit b4a2bba

Browse files
committed
load time zones into mysql
1 parent 2e9a5c8 commit b4a2bba

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

5.5/docker-entrypoint.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ if [ "$1" = 'mysqld' ]; then
4949
exit 1
5050
fi
5151

52+
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql --protocol=socket -uroot mysql
53+
5254
# These statements _must_ be on individual lines, and _must_ end with
5355
# semicolons (no line breaks or comments are permitted).
5456
# TODO proper SQL escaping on ALL the things D:

5.6/docker-entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ if [ "$1" = 'mysqld' ]; then
4848
exit 1
4949
fi
5050

51+
# sed is for https://bugs.mysql.com/bug.php?id=20545
52+
mysql_tzinfo_to_sql /usr/share/zoneinfo | sed 's/Local time zone must be set--see zic manual page/FCTY/' | mysql --protocol=socket -uroot mysql
53+
5154
# These statements _must_ be on individual lines, and _must_ end with
5255
# semicolons (no line breaks or comments are permitted).
5356
# TODO proper SQL escaping on ALL the things D:

5.7/docker-entrypoint.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ if [ "$1" = 'mysqld' ]; then
4848
exit 1
4949
fi
5050

51+
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql --protocol=socket -uroot mysql
52+
5153
# These statements _must_ be on individual lines, and _must_ end with
5254
# semicolons (no line breaks or comments are permitted).
5355
# TODO proper SQL escaping on ALL the things D:

0 commit comments

Comments
 (0)