Skip to content

daticahealth/mysql-timezone-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MySQL Timezone Generator

This is a basic script to generate timezone SQL from the local timezone information on a Unix-like system, using the mysql_tzinfo_to_sql tool included with MySQL distributions. This script will not run on Windows.

For more info on mysql_tzinfo_to_sql, see https://dev.mysql.com/doc/refman/8.0/en/mysql-tzinfo-to-sql.html.

Generating SQL

This repository provides two options. Both require this repository to be cloned locally.

If you have Docker installed, this is the simplest option. Run the following inside the cloned project directory:

./docker-run.sh

If you don't have Docker, but do have MySQL installed, you can run the generator script directly:

./generate-timezones.sh

Via either method, timezones.sql will be created inside the cloned directory.

Importing into Datica CPaaS-hosted database

To import the newly-generated data into a [Datica CPaaS]-hosted database service, use the Datica CLI:

datica -E <your-environment-name> db import <your-database-service-name> timezones.sql

About

Basic MySQL timezone SQL generator script

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages