Return to Snippet

Revision: 29202
at July 23, 2010 17:43 by emregulcan


Initial Code
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for timezones
-- ----------------------------
CREATE TABLE `timezones` (
  `timezoneID` int(11) NOT NULL AUTO_INCREMENT,
  `timezoneName` varchar(50) NOT NULL,
  `timezoneValue` time DEFAULT NULL,
  `timezoneMinusPlus` varchar(1) DEFAULT NULL,
  `timezoneMinuteValue` int(11) DEFAULT NULL,
  PRIMARY KEY (`timezoneID`)
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8;


INSERT INTO `timezones` VALUES ('1', 'Eniwetok, Kwajalein', '12:00:00', '-', '720');
INSERT INTO `timezones` VALUES ('2', 'Midway Island, Samoa', '11:00:00', '-', '660');
INSERT INTO `timezones` VALUES ('3', 'Hawaii', '10:00:00', '-', '600');
INSERT INTO `timezones` VALUES ('4', 'Alaska', '09:00:00', '-', '540');
INSERT INTO `timezones` VALUES ('5', 'Pacific Time (US & Canada)', '08:00:00', '-', '480');
INSERT INTO `timezones` VALUES ('6', 'Mountain Time (US & Canada)', '07:00:00', '-', '420');
INSERT INTO `timezones` VALUES ('7', 'Central Time (US & Canada), Mexico City', '06:00:00', '-', '360');
INSERT INTO `timezones` VALUES ('8', 'Eastern Time (US & Canada), Bogota, Lima', '05:00:00', '-', '300');
INSERT INTO `timezones` VALUES ('9', 'Atlantic Time (Canada), Caracas, La Paz', '04:00:00', '-', '240');
INSERT INTO `timezones` VALUES ('10', 'Newfoundland', '03:30:00', '-', '210');
INSERT INTO `timezones` VALUES ('11', 'Brazil, Buenos Aires, Georgetown', '03:00:00', '-', '180');
INSERT INTO `timezones` VALUES ('12', 'Mid-Atlantic', '02:00:00', '-', '120');
INSERT INTO `timezones` VALUES ('13', 'Azores, Cape Verde Islands', '01:00:00', '-', '60');
INSERT INTO `timezones` VALUES ('14', 'Western Europe Time, London, Lisbon, Casablanca', '00:00:00', '+', '0');
INSERT INTO `timezones` VALUES ('15', 'Brussels, Copenhagen, Madrid, Paris', '01:00:00', '+', '60');
INSERT INTO `timezones` VALUES ('16', 'Kaliningrad, South Africa, Istanbul, Athens', '02:00:00', '+', '120');
INSERT INTO `timezones` VALUES ('17', 'Baghdad, Riyadh, Moscow, St. Petersburg', '03:00:00', '+', '180');
INSERT INTO `timezones` VALUES ('18', 'Tehran', '03:30:00', '+', '210');
INSERT INTO `timezones` VALUES ('19', 'Abu Dhabi, Muscat, Baku, Tbilisi', '04:00:00', '+', '240');
INSERT INTO `timezones` VALUES ('20', 'Kabul', '04:30:00', '+', '270');
INSERT INTO `timezones` VALUES ('21', 'Ekaterinburg, Islamabad, Karachi, Tashkent', '05:00:00', '+', '300');
INSERT INTO `timezones` VALUES ('22', 'Bombay, Calcutta, Madras, New Delhi', '05:30:00', '+', '330');
INSERT INTO `timezones` VALUES ('23', 'Kathmandu', '05:45:00', '+', '345');
INSERT INTO `timezones` VALUES ('24', 'Almaty, Dhaka, Colombo', '06:00:00', '+', '360');
INSERT INTO `timezones` VALUES ('25', 'Bangkok, Hanoi, Jakarta', '07:00:00', '+', '420');
INSERT INTO `timezones` VALUES ('26', 'Beijing, Perth, Singapore, Hong Kong', '08:00:00', '+', '480');
INSERT INTO `timezones` VALUES ('27', 'Tokyo, Seoul, Osaka, Sapporo, Yakutsk', '09:00:00', '+', '540');
INSERT INTO `timezones` VALUES ('28', 'Adelaide, Darwin', '09:30:00', '+', '570');
INSERT INTO `timezones` VALUES ('29', 'Eastern Australia, Guam, Vladivostok', '10:00:00', '+', '600');
INSERT INTO `timezones` VALUES ('30', 'Magadan, Solomon Islands, New Caledonia', '11:00:00', '+', '660');
INSERT INTO `timezones` VALUES ('31', 'Auckland, Wellington, Fiji, Kamchatka', '12:00:00', '+', '720');
INSERT INTO `timezones` VALUES ('32', 'Chatham Islands', '12:45:00', '+', '765');
INSERT INTO `timezones` VALUES ('33', 'New Zelanad Daylight Time, Tonga', '13:00:00', '+', '780');

Initial URL
http://blog.uptimerobot.com/free-timezones-database-for-your-web-apps/

Initial Description
You can run this sql scripts in your database.
Firstly it creates a database and after insert records (timezones)

Initial Title
Timezone database

Initial Tags
sql

Initial Language
SQL