diff --git a/gulpfile.js b/gulpfile.js index 55bb17239..88d1f0c51 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -7,6 +7,7 @@ var argv = require('yargs').argv, concat = require('gulp-concat'), cssnano = require('gulp-cssnano'), ejs = require('gulp-ejs'), + execSync = require('child_process').execSync, gulp = require('gulp'), rimraf = require('rimraf'), sass = require('gulp-sass'), @@ -185,6 +186,10 @@ gulp.task('images', function () { .pipe(gulp.dest('dist/img')); }); +gulp.task('timezones', function (done) { + execSync('./scripts/createTimezones.js ./dist/js/timezones.js'); + done(); +}); // -------------- // Utilities @@ -195,7 +200,7 @@ gulp.task('clean', function (done) { done(); }); -gulp.task('default', gulp.series(['clean', 'html', 'js', '3rdparty', 'images', 'css'])); +gulp.task('default', gulp.series(['clean', 'html', 'js', 'timezones', '3rdparty', 'images', 'css'])); gulp.task('watch', function (done) { gulp.watch(['src/*.scss'], gulp.series(['css'])); @@ -203,6 +208,7 @@ gulp.task('watch', function (done) { gulp.watch(['src/**/*.html'], gulp.series(['html'])); gulp.watch(['src/views/*.html'], gulp.series(['html-views'])); gulp.watch(['src/templates/*.html'], gulp.series(['html-templates'])); + gulp.watch(['scripts/createTimezones.js'], gulp.series(['timezones'])); gulp.watch(['src/js/setup.js', 'src/js/client.js'], gulp.series(['js-setup'])); gulp.watch(['src/js/setupdns.js', 'src/js/client.js'], gulp.series(['js-setupdns'])); gulp.watch(['src/js/restore.js', 'src/js/client.js'], gulp.series(['js-restore'])); diff --git a/scripts/createTimezones.js b/scripts/createTimezones.js new file mode 100755 index 000000000..14b68968a --- /dev/null +++ b/scripts/createTimezones.js @@ -0,0 +1,387 @@ +#!/usr/bin/env node + +// This script creates a specific timezones.js to be consumed by the dashboard + +var execSync = require('child_process').execSync, + fs = require('fs'), + path = require('path'); + +if (process.argv.length !== 3) { + console.log('Usage: createTimezones.js '); + process.exit(1); +} + +const destinationFilePath = path.resolve(process.argv[2]); +console.log('Creating timezone info at:', destinationFilePath); + +var ubuntuTimezones = execSync('timedatectl list-timezones --no-pager').toString().split('\n').filter(function (t) { return !!t; }); + +// from https://github.com/dmfilipenko/timezones.json/blob/master/timezones.json +var details = [ + { name: 'UTC', offset: '+00:00' }, + { name: 'Africa/Abidjan', offset: '+00:00' }, + { name: 'Africa/Accra', offset: '+00:00' }, + { name: 'Africa/Algiers', offset: '+01:00' }, + { name: 'Africa/Bissau', offset: '+00:00' }, + { name: 'Africa/Cairo', offset: '+02:00' }, + { name: 'Africa/Casablanca', offset: '+01:00' }, + { name: 'Africa/Ceuta', offset: '+01:00' }, + { name: 'Africa/El_Aaiun', offset: '+00:00' }, + { name: 'Africa/Johannesburg', offset: '+02:00' }, + { name: 'Africa/Juba', offset: '+03:00' }, + { name: 'Africa/Khartoum', offset: '+02:00' }, + { name: 'Africa/Lagos', offset: '+01:00' }, + { name: 'Africa/Maputo', offset: '+02:00' }, + { name: 'Africa/Monrovia', offset: '+00:00' }, + { name: 'Africa/Nairobi', offset: '+03:00' }, + { name: 'Africa/Ndjamena', offset: '+01:00' }, + { name: 'Africa/Tripoli', offset: '+02:00' }, + { name: 'Africa/Tunis', offset: '+01:00' }, + { name: 'Africa/Windhoek', offset: '+02:00' }, + { name: 'America/Adak', offset: '−10:00' }, + { name: 'America/Anchorage', offset: '−09:00' }, + { name: 'America/Araguaina', offset: '−03:00' }, + { name: 'America/Argentina/Buenos_Aires', offset: '−03:00' }, + { name: 'America/Argentina/Catamarca', offset: '−03:00' }, + { name: 'America/Argentina/Cordoba', offset: '−03:00' }, + { name: 'America/Argentina/Jujuy', offset: '−03:00' }, + { name: 'America/Argentina/La_Rioja', offset: '−03:00' }, + { name: 'America/Argentina/Mendoza', offset: '−03:00' }, + { name: 'America/Argentina/Rio_Gallegos', offset: '−03:00' }, + { name: 'America/Argentina/Salta', offset: '−03:00' }, + { name: 'America/Argentina/San_Juan', offset: '−03:00' }, + { name: 'America/Argentina/San_Luis', offset: '−03:00' }, + { name: 'America/Argentina/Tucuman', offset: '−03:00' }, + { name: 'America/Argentina/Ushuaia', offset: '−03:00' }, + { name: 'America/Asuncion', offset: '−04:00' }, + { name: 'America/Atikokan', offset: '−05:00' }, + { name: 'America/Bahia', offset: '−03:00' }, + { name: 'America/Bahia_Banderas', offset: '−06:00' }, + { name: 'America/Barbados', offset: '−04:00' }, + { name: 'America/Belem', offset: '−03:00' }, + { name: 'America/Belize', offset: '−06:00' }, + { name: 'America/Blanc-Sablon', offset: '−04:00' }, + { name: 'America/Boa_Vista', offset: '−04:00' }, + { name: 'America/Bogota', offset: '−05:00' }, + { name: 'America/Boise', offset: '−07:00' }, + { name: 'America/Cambridge_Bay', offset: '−07:00' }, + { name: 'America/Campo_Grande', offset: '−04:00' }, + { name: 'America/Cancun', offset: '−05:00' }, + { name: 'America/Caracas', offset: '−04:00' }, + { name: 'America/Cayenne', offset: '−03:00' }, + { name: 'America/Chicago', offset: '−06:00' }, + { name: 'America/Chihuahua', offset: '−07:00' }, + { name: 'America/Costa_Rica', offset: '−06:00' }, + { name: 'America/Creston', offset: '−07:00' }, + { name: 'America/Cuiaba', offset: '−04:00' }, + { name: 'America/Curacao', offset: '−04:00' }, + { name: 'America/Danmarkshavn', offset: '+00:00' }, + { name: 'America/Dawson', offset: '−08:00' }, + { name: 'America/Dawson_Creek', offset: '−07:00' }, + { name: 'America/Denver', offset: '−07:00' }, + { name: 'America/Detroit', offset: '−05:00' }, + { name: 'America/Edmonton', offset: '−07:00' }, + { name: 'America/Eirunepe', offset: '−05:00' }, + { name: 'America/El_Salvador', offset: '−06:00' }, + { name: 'America/Fort_Nelson', offset: '−07:00' }, + { name: 'America/Fortaleza', offset: '−03:00' }, + { name: 'America/Glace_Bay', offset: '−04:00' }, + { name: 'America/Godthab', offset: '−03:00' }, + { name: 'America/Goose_Bay', offset: '−04:00' }, + { name: 'America/Grand_Turk', offset: '−05:00' }, + { name: 'America/Guatemala', offset: '−06:00' }, + { name: 'America/Guayaquil', offset: '−05:00' }, + { name: 'America/Guyana', offset: '−04:00' }, + { name: 'America/Halifax', offset: '−04:00' }, + { name: 'America/Havana', offset: '−05:00' }, + { name: 'America/Hermosillo', offset: '−07:00' }, + { name: 'America/Indiana/Indianapolis', offset: '−05:00' }, + { name: 'America/Indiana/Knox', offset: '−06:00' }, + { name: 'America/Indiana/Marengo', offset: '−05:00' }, + { name: 'America/Indiana/Petersburg', offset: '−05:00' }, + { name: 'America/Indiana/Tell_City', offset: '−06:00' }, + { name: 'America/Indiana/Vevay', offset: '−05:00' }, + { name: 'America/Indiana/Vincennes', offset: '−05:00' }, + { name: 'America/Indiana/Winamac', offset: '−05:00' }, + { name: 'America/Inuvik', offset: '−07:00' }, + { name: 'America/Iqaluit', offset: '−05:00' }, + { name: 'America/Jamaica', offset: '−05:00' }, + { name: 'America/Juneau', offset: '−09:00' }, + { name: 'America/Kentucky/Louisville', offset: '−05:00' }, + { name: 'America/Kentucky/Monticello', offset: '−05:00' }, + { name: 'America/La_Paz', offset: '−04:00' }, + { name: 'America/Lima', offset: '−05:00' }, + { name: 'America/Los_Angeles', offset: '−08:00' }, + { name: 'America/Maceio', offset: '−03:00' }, + { name: 'America/Managua', offset: '−06:00' }, + { name: 'America/Manaus', offset: '−04:00' }, + { name: 'America/Martinique', offset: '−04:00' }, + { name: 'America/Matamoros', offset: '−06:00' }, + { name: 'America/Mazatlan', offset: '−07:00' }, + { name: 'America/Menominee', offset: '−06:00' }, + { name: 'America/Merida', offset: '−06:00' }, + { name: 'America/Metlakatla', offset: '−09:00' }, + { name: 'America/Mexico_City', offset: '−06:00' }, + { name: 'America/Miquelon', offset: '−03:00' }, + { name: 'America/Moncton', offset: '−04:00' }, + { name: 'America/Monterrey', offset: '−06:00' }, + { name: 'America/Montevideo', offset: '−03:00' }, + { name: 'America/Nassau', offset: '−05:00' }, + { name: 'America/New_York', offset: '−05:00' }, + { name: 'America/Nipigon', offset: '−05:00' }, + { name: 'America/Nome', offset: '−09:00' }, + { name: 'America/Noronha', offset: '−02:00' }, + { name: 'America/North_Dakota/Beulah', offset: '−06:00' }, + { name: 'America/North_Dakota/Center', offset: '−06:00' }, + { name: 'America/North_Dakota/New_Salem', offset: '−06:00' }, + { name: 'America/Ojinaga', offset: '−07:00' }, + { name: 'America/Panama', offset: '−05:00' }, + { name: 'America/Pangnirtung', offset: '−05:00' }, + { name: 'America/Paramaribo', offset: '−03:00' }, + { name: 'America/Phoenix', offset: '−07:00' }, + { name: 'America/Port_of_Spain', offset: '−04:00' }, + { name: 'America/Port-au-Prince', offset: '−05:00' }, + { name: 'America/Porto_Velho', offset: '−04:00' }, + { name: 'America/Puerto_Rico', offset: '−04:00' }, + { name: 'America/Punta_Arenas', offset: '−03:00' }, + { name: 'America/Rainy_River', offset: '−06:00' }, + { name: 'America/Rankin_Inlet', offset: '−06:00' }, + { name: 'America/Recife', offset: '−03:00' }, + { name: 'America/Regina', offset: '−06:00' }, + { name: 'America/Resolute', offset: '−06:00' }, + { name: 'America/Rio_Branco', offset: '−05:00' }, + { name: 'America/Santarem', offset: '−03:00' }, + { name: 'America/Santiago', offset: '−04:00' }, + { name: 'America/Santo_Domingo', offset: '−04:00' }, + { name: 'America/Sao_Paulo', offset: '−03:00' }, + { name: 'America/Scoresbysund', offset: '−01:00' }, + { name: 'America/Sitka', offset: '−09:00' }, + { name: 'America/St_Johns', offset: '−03:30' }, + { name: 'America/Swift_Current', offset: '−06:00' }, + { name: 'America/Tegucigalpa', offset: '−06:00' }, + { name: 'America/Thule', offset: '−04:00' }, + { name: 'America/Thunder_Bay', offset: '−05:00' }, + { name: 'America/Tijuana', offset: '−08:00' }, + { name: 'America/Toronto', offset: '−05:00' }, + { name: 'America/Vancouver', offset: '−08:00' }, + { name: 'America/Whitehorse', offset: '−08:00' }, + { name: 'America/Winnipeg', offset: '−06:00' }, + { name: 'America/Yakutat', offset: '−09:00' }, + { name: 'America/Yellowknife', offset: '−07:00' }, + { name: 'Antarctica/Casey', offset: '+11:00' }, + { name: 'Antarctica/Davis', offset: '+07:00' }, + { name: 'Antarctica/DumontDUrville', offset: '+10:00' }, + { name: 'Antarctica/Macquarie', offset: '+11:00' }, + { name: 'Antarctica/Mawson', offset: '+05:00' }, + { name: 'Antarctica/Palmer', offset: '−03:00' }, + { name: 'Antarctica/Rothera', offset: '−03:00' }, + { name: 'Antarctica/Syowa', offset: '+03:00' }, + { name: 'Antarctica/Troll', offset: '+00:00' }, + { name: 'Antarctica/Vostok', offset: '+06:00' }, + { name: 'Asia/Almaty', offset: '+06:00' }, + { name: 'Asia/Amman', offset: '+02:00' }, + { name: 'Asia/Anadyr', offset: '+12:00' }, + { name: 'Asia/Aqtau', offset: '+05:00' }, + { name: 'Asia/Aqtobe', offset: '+05:00' }, + { name: 'Asia/Ashgabat', offset: '+05:00' }, + { name: 'Asia/Atyrau', offset: '+05:00' }, + { name: 'Asia/Baghdad', offset: '+03:00' }, + { name: 'Asia/Baku', offset: '+04:00' }, + { name: 'Asia/Bangkok', offset: '+07:00' }, + { name: 'Asia/Barnaul', offset: '+07:00' }, + { name: 'Asia/Beirut', offset: '+02:00' }, + { name: 'Asia/Bishkek', offset: '+06:00' }, + { name: 'Asia/Brunei', offset: '+08:00' }, + { name: 'Asia/Chita', offset: '+09:00' }, + { name: 'Asia/Choibalsan', offset: '+08:00' }, + { name: 'Asia/Colombo', offset: '+05:30' }, + { name: 'Asia/Damascus', offset: '+02:00' }, + { name: 'Asia/Dhaka', offset: '+06:00' }, + { name: 'Asia/Dili', offset: '+09:00' }, + { name: 'Asia/Dubai', offset: '+04:00' }, + { name: 'Asia/Dushanbe', offset: '+05:00' }, + { name: 'Asia/Famagusta', offset: '+02:00' }, + { name: 'Asia/Gaza', offset: '+02:00' }, + { name: 'Asia/Hebron', offset: '+02:00' }, + { name: 'Asia/Ho_Chi_Minh', offset: '+07:00' }, + { name: 'Asia/Hong_Kong', offset: '+08:00' }, + { name: 'Asia/Hovd', offset: '+07:00' }, + { name: 'Asia/Irkutsk', offset: '+08:00' }, + { name: 'Asia/Jakarta', offset: '+07:00' }, + { name: 'Asia/Jayapura', offset: '+09:00' }, + { name: 'Asia/Jerusalem', offset: '+02:00' }, + { name: 'Asia/Kabul', offset: '+04:30' }, + { name: 'Asia/Kamchatka', offset: '+12:00' }, + { name: 'Asia/Karachi', offset: '+05:00' }, + { name: 'Asia/Kathmandu', offset: '+05:45' }, + { name: 'Asia/Khandyga', offset: '+09:00' }, + { name: 'Asia/Kolkata', offset: '+05:30' }, + { name: 'Asia/Krasnoyarsk', offset: '+07:00' }, + { name: 'Asia/Kuala_Lumpur', offset: '+08:00' }, + { name: 'Asia/Kuching', offset: '+08:00' }, + { name: 'Asia/Macau', offset: '+08:00' }, + { name: 'Asia/Magadan', offset: '+11:00' }, + { name: 'Asia/Makassar', offset: '+08:00' }, + { name: 'Asia/Manila', offset: '+08:00' }, + { name: 'Asia/Novokuznetsk', offset: '+07:00' }, + { name: 'Asia/Novosibirsk', offset: '+07:00' }, + { name: 'Asia/Omsk', offset: '+06:00' }, + { name: 'Asia/Oral', offset: '+05:00' }, + { name: 'Asia/Pontianak', offset: '+07:00' }, + { name: 'Asia/Pyongyang', offset: '+09:00' }, + { name: 'Asia/Qatar', offset: '+03:00' }, + { name: 'Asia/Qyzylorda', offset: '+05:00' }, + { name: 'Asia/Riyadh', offset: '+03:00' }, + { name: 'Asia/Sakhalin', offset: '+11:00' }, + { name: 'Asia/Samarkand', offset: '+05:00' }, + { name: 'Asia/Seoul', offset: '+09:00' }, + { name: 'Asia/Shanghai', offset: '+08:00' }, + { name: 'Asia/Singapore', offset: '+08:00' }, + { name: 'Asia/Srednekolymsk', offset: '+11:00' }, + { name: 'Asia/Taipei', offset: '+08:00' }, + { name: 'Asia/Tashkent', offset: '+05:00' }, + { name: 'Asia/Tbilisi', offset: '+04:00' }, + { name: 'Asia/Tehran', offset: '+03:30' }, + { name: 'Asia/Thimphu', offset: '+06:00' }, + { name: 'Asia/Tokyo', offset: '+09:00' }, + { name: 'Asia/Tomsk', offset: '+07:00' }, + { name: 'Asia/Ulaanbaatar', offset: '+08:00' }, + { name: 'Asia/Urumqi', offset: '+06:00' }, + { name: 'Asia/Ust-Nera', offset: '+10:00' }, + { name: 'Asia/Vladivostok', offset: '+10:00' }, + { name: 'Asia/Yakutsk', offset: '+09:00' }, + { name: 'Asia/Yangon', offset: '+06:30' }, + { name: 'Asia/Yekaterinburg', offset: '+05:00' }, + { name: 'Asia/Yerevan', offset: '+04:00' }, + { name: 'Atlantic/Azores', offset: '−01:00' }, + { name: 'Atlantic/Bermuda', offset: '−04:00' }, + { name: 'Atlantic/Canary', offset: '+00:00' }, + { name: 'Atlantic/Cape_Verde', offset: '−01:00' }, + { name: 'Atlantic/Faroe', offset: '+00:00' }, + { name: 'Atlantic/Madeira', offset: '+00:00' }, + { name: 'Atlantic/Reykjavik', offset: '+00:00' }, + { name: 'Atlantic/South_Georgia', offset: '−02:00' }, + { name: 'Atlantic/Stanley', offset: '−03:00' }, + { name: 'Australia/Adelaide', offset: '+09:30' }, + { name: 'Australia/Brisbane', offset: '+10:00' }, + { name: 'Australia/Broken_Hill', offset: '+09:30' }, + { name: 'Australia/Currie', offset: '+10:00' }, + { name: 'Australia/Darwin', offset: '+09:30' }, + { name: 'Australia/Eucla', offset: '+08:45' }, + { name: 'Australia/Hobart', offset: '+10:00' }, + { name: 'Australia/Lindeman', offset: '+10:00' }, + { name: 'Australia/Lord_Howe', offset: '+10:30' }, + { name: 'Australia/Melbourne', offset: '+10:00' }, + { name: 'Australia/Perth', offset: '+08:00' }, + { name: 'Australia/Sydney', offset: '+10:00' }, + { name: 'Europe/Amsterdam', offset: '+01:00' }, + { name: 'Europe/Andorra', offset: '+01:00' }, + { name: 'Europe/Astrakhan', offset: '+04:00' }, + { name: 'Europe/Athens', offset: '+02:00' }, + { name: 'Europe/Belgrade', offset: '+01:00' }, + { name: 'Europe/Berlin', offset: '+01:00' }, + { name: 'Europe/Brussels', offset: '+01:00' }, + { name: 'Europe/Bucharest', offset: '+02:00' }, + { name: 'Europe/Budapest', offset: '+01:00' }, + { name: 'Europe/Chisinau', offset: '+02:00' }, + { name: 'Europe/Copenhagen', offset: '+01:00' }, + { name: 'Europe/Dublin', offset: '+00:00' }, + { name: 'Europe/Gibraltar', offset: '+01:00' }, + { name: 'Europe/Helsinki', offset: '+02:00' }, + { name: 'Europe/Istanbul', offset: '+03:00' }, + { name: 'Europe/Kaliningrad', offset: '+02:00' }, + { name: 'Europe/Kiev', offset: '+02:00' }, + { name: 'Europe/Kirov', offset: '+03:00' }, + { name: 'Europe/Lisbon', offset: '+00:00' }, + { name: 'Europe/London', offset: '+00:00' }, + { name: 'Europe/Luxembourg', offset: '+01:00' }, + { name: 'Europe/Madrid', offset: '+01:00' }, + { name: 'Europe/Malta', offset: '+01:00' }, + { name: 'Europe/Minsk', offset: '+03:00' }, + { name: 'Europe/Monaco', offset: '+01:00' }, + { name: 'Europe/Moscow', offset: '+03:00' }, + { name: 'Asia/Nicosia', offset: '+02:00' }, + { name: 'Europe/Oslo', offset: '+01:00' }, + { name: 'Europe/Paris', offset: '+01:00' }, + { name: 'Europe/Prague', offset: '+01:00' }, + { name: 'Europe/Riga', offset: '+02:00' }, + { name: 'Europe/Rome', offset: '+01:00' }, + { name: 'Europe/Samara', offset: '+04:00' }, + { name: 'Europe/Saratov', offset: '+04:00' }, + { name: 'Europe/Simferopol', offset: '+03:00' }, + { name: 'Europe/Sofia', offset: '+02:00' }, + { name: 'Europe/Stockholm', offset: '+01:00' }, + { name: 'Europe/Tallinn', offset: '+02:00' }, + { name: 'Europe/Tirane', offset: '+01:00' }, + { name: 'Europe/Ulyanovsk', offset: '+04:00' }, + { name: 'Europe/Uzhgorod', offset: '+02:00' }, + { name: 'Europe/Vienna', offset: '+01:00' }, + { name: 'Europe/Vilnius', offset: '+02:00' }, + { name: 'Europe/Volgograd', offset: '+04:00' }, + { name: 'Europe/Warsaw', offset: '+01:00' }, + { name: 'Europe/Zaporozhye', offset: '+02:00' }, + { name: 'Europe/Zurich', offset: '+01:00' }, + { name: 'Indian/Chagos', offset: '+06:00' }, + { name: 'Indian/Christmas', offset: '+07:00' }, + { name: 'Indian/Cocos', offset: '+06:30' }, + { name: 'Indian/Kerguelen', offset: '+05:00' }, + { name: 'Indian/Mahe', offset: '+04:00' }, + { name: 'Indian/Maldives', offset: '+05:00' }, + { name: 'Indian/Mauritius', offset: '+04:00' }, + { name: 'Indian/Reunion', offset: '+04:00' }, + { name: 'Pacific/Apia', offset: '+13:00' }, + { name: 'Pacific/Auckland', offset: '+12:00' }, + { name: 'Pacific/Bougainville', offset: '+11:00' }, + { name: 'Pacific/Chatham', offset: '+12:45' }, + { name: 'Pacific/Chuuk', offset: '+10:00' }, + { name: 'Pacific/Easter', offset: '−06:00' }, + { name: 'Pacific/Efate', offset: '+11:00' }, + { name: 'Pacific/Enderbury', offset: '+13:00' }, + { name: 'Pacific/Fakaofo', offset: '+13:00' }, + { name: 'Pacific/Fiji', offset: '+12:00' }, + { name: 'Pacific/Funafuti', offset: '+12:00' }, + { name: 'Pacific/Galapagos', offset: '−06:00' }, + { name: 'Pacific/Gambier', offset: '−09:00' }, + { name: 'Pacific/Guadalcanal', offset: '+11:00' }, + { name: 'Pacific/Guam', offset: '+10:00' }, + { name: 'Pacific/Honolulu', offset: '−10:00' }, + { name: 'Pacific/Kiritimati', offset: '+14:00' }, + { name: 'Pacific/Kosrae', offset: '+11:00' }, + { name: 'Pacific/Kwajalein', offset: '+12:00' }, + { name: 'Pacific/Majuro', offset: '+12:00' }, + { name: 'Pacific/Marquesas', offset: '−09:30' }, + { name: 'Pacific/Nauru', offset: '+12:00' }, + { name: 'Pacific/Niue', offset: '−11:00' }, + { name: 'Pacific/Norfolk', offset: '+11:00' }, + { name: 'Pacific/Noumea', offset: '+11:00' }, + { name: 'Pacific/Pago_Pago', offset: '−11:00' }, + { name: 'Pacific/Palau', offset: '+09:00' }, + { name: 'Pacific/Pitcairn', offset: '−08:00' }, + { name: 'Pacific/Pohnpei', offset: '+11:00' }, + { name: 'Pacific/Port_Moresby', offset: '+10:00' }, + { name: 'Pacific/Rarotonga', offset: '−10:00' }, + { name: 'Pacific/Tahiti', offset: '−10:00' }, + { name: 'Pacific/Tarawa', offset: '+12:00' }, + { name: 'Pacific/Tongatapu', offset: '+13:00' }, + { name: 'Pacific/Wake', offset: '+12:00' }, + { name: 'Pacific/Wallis', offset: '+12:00' }, +]; + +var timezones = ubuntuTimezones.map(function (t) { + var detail = details.find(function (d) { + return d.name === t; + }); + + if (!detail) return null; + + return { + id: t, + display: `(UTC${detail.offset}) ${t}` + } +}).filter(function (t) { return !!t; }); + +var output = `(function () { window.timezones = ${JSON.stringify(timezones)}; })();\n`; + +fs.writeFileSync(destinationFilePath, output, 'utf-8'); + +console.log('Done'); diff --git a/src/3rdparty/js/timezones.js b/src/3rdparty/js/timezones.js deleted file mode 100644 index 0f0f6750b..000000000 --- a/src/3rdparty/js/timezones.js +++ /dev/null @@ -1,1435 +0,0 @@ -// TODO do this probably during gulp time - -(function () { - // from ubuntu: timedatectl list-timezones - var ubuntuTimezones = [ 'UTC', 'Africa/Abidjan', 'Africa/Accra', 'Africa/Algiers', 'Africa/Bissau', 'Africa/Cairo', 'Africa/Casablanca', 'Africa/Ceuta', 'Africa/El_Aaiun', 'Africa/Johannesburg', 'Africa/Juba', 'Africa/Khartoum', 'Africa/Lagos', 'Africa/Maputo', 'Africa/Monrovia', 'Africa/Nairobi', 'Africa/Ndjamena', 'Africa/Sao_Tome', 'Africa/Tripoli', 'Africa/Tunis', 'Africa/Windhoek', 'America/Anchorage', 'America/Araguaina', 'America/Argentina/Buenos_Aires', 'America/Argentina/Catamarca', 'America/Argentina/Cordoba', 'America/Argentina/Jujuy', 'America/Argentina/La_Rioja', 'America/Argentina/Mendoza', 'America/Argentina/Rio_Gallegos', 'America/Argentina/Salta', 'America/Argentina/San_Juan', 'America/Argentina/San_Luis', 'America/Argentina/Tucuman', 'America/Argentina/Ushuaia', 'America/Asuncion', 'America/Bahia', 'America/Bahia_Banderas', 'America/Barbados', 'America/Belem', 'America/Belize', 'America/Blanc-Sablon', 'America/Boa_Vista', 'America/Bogota', 'America/Boise', 'America/Cambridge_Bay', 'America/Campo_Grande', 'America/Cancun', 'America/Caracas', 'America/Cayenne', 'America/Chicago', 'America/Chihuahua', 'America/Costa_Rica', 'America/Creston', 'America/Cuiaba', 'America/Curacao', 'America/Danmarkshavn', 'America/Dawson', 'America/Dawson_Creek', 'America/Denver', 'America/Detroit', 'America/Edmonton', 'America/Eirunepe', 'America/El_Salvador', 'America/Fortaleza', 'America/Glace_Bay', 'America/Godthab', 'America/Goose_Bay', 'America/Grand_Turk', 'America/Guatemala', 'America/Guayaquil', 'America/Guyana', 'America/Halifax', 'America/Havana', 'America/Hermosillo', 'America/Indiana/Indianapolis', 'America/Indiana/Knox', 'America/Indiana/Marengo', 'America/Indiana/Petersburg', 'America/Indiana/Tell_City', 'America/Indiana/Vevay', 'America/Indiana/Vincennes', 'America/Indiana/Winamac', 'America/Inuvik', 'America/Iqaluit', 'America/Jamaica', 'America/Juneau', 'America/Kentucky/Louisville', 'America/Kentucky/Monticello', 'America/La_Paz', 'America/Lima', 'America/Los_Angeles', 'America/Maceio', 'America/Managua', 'America/Manaus', 'America/Martinique', 'America/Matamoros', 'America/Mazatlan', 'America/Menominee', 'America/Merida', 'America/Mexico_City', 'America/Moncton', 'America/Monterrey', 'America/Montevideo', 'America/Nassau', 'America/New_York', 'America/Nipigon', 'America/Nome', 'America/Noronha', 'America/North_Dakota/Beulah', 'America/North_Dakota/Center', 'America/North_Dakota/New_Salem', 'America/Ojinaga', 'America/Panama', 'America/Pangnirtung', 'America/Paramaribo', 'America/Phoenix', 'America/Port-au-Prince', 'America/Port_of_Spain', 'America/Porto_Velho', 'America/Puerto_Rico', 'America/Rainy_River', 'America/Rankin_Inlet', 'America/Recife', 'America/Regina', 'America/Resolute', 'America/Rio_Branco', 'America/Santarem', 'America/Santiago', 'America/Santo_Domingo', 'America/Sao_Paulo', 'America/Scoresbysund', 'America/Sitka', 'America/St_Johns', 'America/Swift_Current', 'America/Tegucigalpa', 'America/Thule', 'America/Thunder_Bay', 'America/Tijuana', 'America/Toronto', 'America/Vancouver', 'America/Whitehorse', 'America/Winnipeg', 'America/Yakutat', 'America/Yellowknife', 'Antarctica/Casey', 'Antarctica/Davis', 'Antarctica/DumontDUrville', 'Antarctica/Macquarie', 'Antarctica/Mawson', 'Antarctica/Palmer', 'Antarctica/Rothera', 'Antarctica/Syowa', 'Antarctica/Vostok', 'Asia/Almaty', 'Asia/Amman', 'Asia/Anadyr', 'Asia/Aqtau', 'Asia/Aqtobe', 'Asia/Ashgabat', 'Asia/Baghdad', 'Asia/Baku', 'Asia/Bangkok', 'Asia/Beirut', 'Asia/Bishkek', 'Asia/Brunei', 'Asia/Chita', 'Asia/Choibalsan', 'Asia/Colombo', 'Asia/Damascus', 'Asia/Dhaka', 'Asia/Dili', 'Asia/Dubai', 'Asia/Dushanbe', 'Asia/Hong_Kong', 'Asia/Hovd', 'Asia/Irkutsk', 'Asia/Jakarta', 'Asia/Jayapura', 'Asia/Jerusalem', 'Asia/Kabul', 'Asia/Kamchatka', 'Asia/Karachi', 'Asia/Kathmandu', 'Asia/Khandyga', 'Asia/Kolkata', 'Asia/Krasnoyarsk', 'Asia/Kuala_Lumpur', 'Asia/Kuching', 'Asia/Macau', 'Asia/Magadan', 'Asia/Makassar', 'Asia/Manila', 'Asia/Nicosia', 'Asia/Novokuznetsk', 'Asia/Novosibirsk', 'Asia/Omsk', 'Asia/Oral', 'Asia/Pontianak', 'Asia/Pyongyang', 'Asia/Qatar', 'Asia/Qyzylorda', 'Asia/Riyadh', 'Asia/Sakhalin', 'Asia/Samarkand', 'Asia/Seoul', 'Asia/Shanghai', 'Asia/Singapore', 'Asia/Srednekolymsk', 'Asia/Taipei', 'Asia/Tashkent', 'Asia/Tbilisi', 'Asia/Tehran', 'Asia/Thimphu', 'Asia/Tokyo', 'Asia/Ulaanbaatar', 'Asia/Urumqi', 'Asia/Ust-Nera', 'Asia/Vladivostok', 'Asia/Yakutsk', 'Asia/Yekaterinburg', 'Asia/Yerevan', 'Atlantic/Azores', 'Atlantic/Bermuda', 'Atlantic/Canary', 'Atlantic/Cape_Verde', 'Atlantic/Madeira', 'Atlantic/Reykjavik', 'Atlantic/South_Georgia', 'Atlantic/Stanley', 'Australia/Adelaide', 'Australia/Brisbane', 'Australia/Broken_Hill', 'Australia/Currie', 'Australia/Darwin', 'Australia/Hobart', 'Australia/Lindeman', 'Australia/Melbourne', 'Australia/Perth', 'Australia/Sydney', 'Europe/Amsterdam', 'Europe/Andorra', 'Europe/Astrakhan', 'Europe/Athens', 'Europe/Belgrade', 'Europe/Berlin', 'Europe/Brussels', 'Europe/Bucharest', 'Europe/Budapest', 'Europe/Chisinau', 'Europe/Copenhagen', 'Europe/Dublin', 'Europe/Gibraltar', 'Europe/Helsinki', 'Europe/Istanbul', 'Europe/Kaliningrad', 'Europe/Kiev', 'Europe/Kirov', 'Europe/Lisbon', 'Europe/London', 'Europe/Luxembourg', 'Europe/Madrid', 'Europe/Malta', 'Europe/Minsk', 'Europe/Monaco', 'Europe/Moscow', 'Europe/Oslo', 'Europe/Paris', 'Europe/Prague', 'Europe/Riga', 'Europe/Rome', 'Europe/Samara', 'Europe/Simferopol', 'Europe/Sofia', 'Europe/Stockholm', 'Europe/Tallinn', 'Europe/Tirane', 'Europe/Ulyanovsk', 'Europe/Uzhgorod', 'Europe/Vienna', 'Europe/Vilnius', 'Europe/Volgograd', 'Europe/Warsaw', 'Europe/Zaporozhye', 'Europe/Zurich', 'Indian/Chagos', 'Indian/Christmas', 'Indian/Cocos', 'Indian/Kerguelen', 'Indian/Mahe', 'Indian/Maldives', 'Indian/Mauritius', 'Indian/Reunion', 'Pacific/Apia', 'Pacific/Auckland', 'Pacific/Efate', 'Pacific/Enderbury', 'Pacific/Fakaofo', 'Pacific/Fiji', 'Pacific/Funafuti', 'Pacific/Galapagos', 'Pacific/Guadalcanal', 'Pacific/Guam', 'Pacific/Honolulu', 'Pacific/Kosrae', 'Pacific/Kwajalein', 'Pacific/Majuro', 'Pacific/Nauru', 'Pacific/Niue', 'Pacific/Noumea', 'Pacific/Pago_Pago', 'Pacific/Palau', 'Pacific/Port_Moresby', 'Pacific/Rarotonga', 'Pacific/Tahiti', 'Pacific/Tarawa', 'Pacific/Tongatapu', 'Pacific/Wake', 'Pacific/Wallis' ]; - - // from https://github.com/dmfilipenko/timezones.json/blob/master/timezones.json - var details = [ - { - "value": "Dateline Standard Time", - "abbr": "DST", - "offset": -12, - "isdst": false, - "text": "(UTC-12:00) International Date Line West", - "utc": [ - "Etc/GMT+12" - ] - }, - { - "value": "UTC-11", - "abbr": "U", - "offset": -11, - "isdst": false, - "text": "(UTC-11:00) Coordinated Universal Time-11", - "utc": [ - "Etc/GMT+11", - "Pacific/Midway", - "Pacific/Niue", - "Pacific/Pago_Pago" - ] - }, - { - "value": "Hawaiian Standard Time", - "abbr": "HST", - "offset": -10, - "isdst": false, - "text": "(UTC-10:00) Hawaii", - "utc": [ - "Etc/GMT+10", - "Pacific/Honolulu", - "Pacific/Johnston", - "Pacific/Rarotonga", - "Pacific/Tahiti" - ] - }, - { - "value": "Alaskan Standard Time", - "abbr": "AKDT", - "offset": -8, - "isdst": true, - "text": "(UTC-09:00) Alaska", - "utc": [ - "America/Anchorage", - "America/Juneau", - "America/Nome", - "America/Sitka", - "America/Yakutat" - ] - }, - { - "value": "Pacific Standard Time (Mexico)", - "abbr": "PDT", - "offset": -7, - "isdst": true, - "text": "(UTC-08:00) Baja California", - "utc": [ - "America/Santa_Isabel" - ] - }, - { - "value": "Pacific Daylight Time", - "abbr": "PDT", - "offset": -7, - "isdst": true, - "text": "(UTC-07:00) Pacific Time (US & Canada)", - "utc": [ - "America/Dawson", - "America/Los_Angeles", - "America/Tijuana", - "America/Vancouver", - "America/Whitehorse" - ] - }, - { - "value": "Pacific Standard Time", - "abbr": "PST", - "offset": -8, - "isdst": false, - "text": "(UTC-08:00) Pacific Time (US & Canada)", - "utc": [ - "America/Dawson", - "America/Los_Angeles", - "America/Tijuana", - "America/Vancouver", - "America/Whitehorse", - "PST8PDT" - ] - }, - { - "value": "US Mountain Standard Time", - "abbr": "UMST", - "offset": -7, - "isdst": false, - "text": "(UTC-07:00) Arizona", - "utc": [ - "America/Creston", - "America/Dawson_Creek", - "America/Hermosillo", - "America/Phoenix", - "Etc/GMT+7" - ] - }, - { - "value": "Mountain Standard Time (Mexico)", - "abbr": "MDT", - "offset": -6, - "isdst": true, - "text": "(UTC-07:00) Chihuahua, La Paz, Mazatlan", - "utc": [ - "America/Chihuahua", - "America/Mazatlan" - ] - }, - { - "value": "Mountain Standard Time", - "abbr": "MDT", - "offset": -6, - "isdst": true, - "text": "(UTC-07:00) Mountain Time (US & Canada)", - "utc": [ - "America/Boise", - "America/Cambridge_Bay", - "America/Denver", - "America/Edmonton", - "America/Inuvik", - "America/Ojinaga", - "America/Yellowknife", - "MST7MDT" - ] - }, - { - "value": "Central America Standard Time", - "abbr": "CAST", - "offset": -6, - "isdst": false, - "text": "(UTC-06:00) Central America", - "utc": [ - "America/Belize", - "America/Costa_Rica", - "America/El_Salvador", - "America/Guatemala", - "America/Managua", - "America/Tegucigalpa", - "Etc/GMT+6", - "Pacific/Galapagos" - ] - }, - { - "value": "Central Standard Time", - "abbr": "CDT", - "offset": -5, - "isdst": true, - "text": "(UTC-06:00) Central Time (US & Canada)", - "utc": [ - "America/Chicago", - "America/Indiana/Knox", - "America/Indiana/Tell_City", - "America/Matamoros", - "America/Menominee", - "America/North_Dakota/Beulah", - "America/North_Dakota/Center", - "America/North_Dakota/New_Salem", - "America/Rainy_River", - "America/Rankin_Inlet", - "America/Resolute", - "America/Winnipeg", - "CST6CDT" - ] - }, - { - "value": "Central Standard Time (Mexico)", - "abbr": "CDT", - "offset": -5, - "isdst": true, - "text": "(UTC-06:00) Guadalajara, Mexico City, Monterrey", - "utc": [ - "America/Bahia_Banderas", - "America/Cancun", - "America/Merida", - "America/Mexico_City", - "America/Monterrey" - ] - }, - { - "value": "Canada Central Standard Time", - "abbr": "CCST", - "offset": -6, - "isdst": false, - "text": "(UTC-06:00) Saskatchewan", - "utc": [ - "America/Regina", - "America/Swift_Current" - ] - }, - { - "value": "SA Pacific Standard Time", - "abbr": "SPST", - "offset": -5, - "isdst": false, - "text": "(UTC-05:00) Bogota, Lima, Quito", - "utc": [ - "America/Bogota", - "America/Cayman", - "America/Coral_Harbour", - "America/Eirunepe", - "America/Guayaquil", - "America/Jamaica", - "America/Lima", - "America/Panama", - "America/Rio_Branco", - "Etc/GMT+5" - ] - }, - { - "value": "Eastern Standard Time", - "abbr": "EDT", - "offset": -4, - "isdst": true, - "text": "(UTC-05:00) Eastern Time (US & Canada)", - "utc": [ - "America/Detroit", - "America/Havana", - "America/Indiana/Petersburg", - "America/Indiana/Vincennes", - "America/Indiana/Winamac", - "America/Iqaluit", - "America/Kentucky/Monticello", - "America/Kentucky/Louisville", - "America/Montreal", - "America/Nassau", - "America/New_York", - "America/Nipigon", - "America/Pangnirtung", - "America/Port-au-Prince", - "America/Thunder_Bay", - "America/Toronto", - "EST5EDT" - ] - }, - { - "value": "US Eastern Standard Time", - "abbr": "UEDT", - "offset": -4, - "isdst": true, - "text": "(UTC-05:00) Indiana (East)", - "utc": [ - "America/Indiana/Marengo", - "America/Indiana/Vevay", - "America/Indiana/Indianapolis" - ] - }, - { - "value": "Venezuela Standard Time", - "abbr": "VST", - "offset": -4.5, - "isdst": false, - "text": "(UTC-04:30) Caracas", - "utc": [ - "America/Caracas" - ] - }, - { - "value": "Paraguay Standard Time", - "abbr": "PYT", - "offset": -4, - "isdst": false, - "text": "(UTC-04:00) Asuncion", - "utc": [ - "America/Asuncion" - ] - }, - { - "value": "Atlantic Standard Time", - "abbr": "ADT", - "offset": -3, - "isdst": true, - "text": "(UTC-04:00) Atlantic Time (Canada)", - "utc": [ - "America/Glace_Bay", - "America/Goose_Bay", - "America/Halifax", - "America/Moncton", - "America/Thule", - "Atlantic/Bermuda" - ] - }, - { - "value": "Central Brazilian Standard Time", - "abbr": "CBST", - "offset": -4, - "isdst": false, - "text": "(UTC-04:00) Cuiaba", - "utc": [ - "America/Campo_Grande", - "America/Cuiaba" - ] - }, - { - "value": "SA Western Standard Time", - "abbr": "SWST", - "offset": -4, - "isdst": false, - "text": "(UTC-04:00) Georgetown, La Paz, Manaus, San Juan", - "utc": [ - "America/Anguilla", - "America/Antigua", - "America/Aruba", - "America/Barbados", - "America/Blanc-Sablon", - "America/Boa_Vista", - "America/Curacao", - "America/Dominica", - "America/Grand_Turk", - "America/Grenada", - "America/Guadeloupe", - "America/Guyana", - "America/Kralendijk", - "America/La_Paz", - "America/Lower_Princes", - "America/Manaus", - "America/Marigot", - "America/Martinique", - "America/Montserrat", - "America/Port_of_Spain", - "America/Porto_Velho", - "America/Puerto_Rico", - "America/Santo_Domingo", - "America/St_Barthelemy", - "America/St_Kitts", - "America/St_Lucia", - "America/St_Thomas", - "America/St_Vincent", - "America/Tortola", - "Etc/GMT+4" - ] - }, - { - "value": "Pacific SA Standard Time", - "abbr": "PSST", - "offset": -4, - "isdst": false, - "text": "(UTC-04:00) Santiago", - "utc": [ - "America/Santiago", - "Antarctica/Palmer" - ] - }, - { - "value": "Newfoundland Standard Time", - "abbr": "NDT", - "offset": -2.5, - "isdst": true, - "text": "(UTC-03:30) Newfoundland", - "utc": [ - "America/St_Johns" - ] - }, - { - "value": "E. South America Standard Time", - "abbr": "ESAST", - "offset": -3, - "isdst": false, - "text": "(UTC-03:00) Brasilia", - "utc": [ - "America/Sao_Paulo" - ] - }, - { - "value": "Argentina Standard Time", - "abbr": "AST", - "offset": -3, - "isdst": false, - "text": "(UTC-03:00) Buenos Aires", - "utc": [ - "America/Argentina/La_Rioja", - "America/Argentina/Rio_Gallegos", - "America/Argentina/Salta", - "America/Argentina/San_Juan", - "America/Argentina/San_Luis", - "America/Argentina/Tucuman", - "America/Argentina/Ushuaia", - "America/Argentina/Buenos_Aires", - "America/Argentina/Catamarca", - "America/Argentina/Cordoba", - "America/Argentina/Jujuy", - "America/Argentina/Mendoza" - ] - }, - { - "value": "SA Eastern Standard Time", - "abbr": "SEST", - "offset": -3, - "isdst": false, - "text": "(UTC-03:00) Cayenne, Fortaleza", - "utc": [ - "America/Araguaina", - "America/Belem", - "America/Cayenne", - "America/Fortaleza", - "America/Maceio", - "America/Paramaribo", - "America/Recife", - "America/Santarem", - "Antarctica/Rothera", - "Atlantic/Stanley", - "Etc/GMT+3" - ] - }, - { - "value": "Greenland Standard Time", - "abbr": "GDT", - "offset": -3, - "isdst": true, - "text": "(UTC-03:00) Greenland", - "utc": [ - "America/Godthab" - ] - }, - { - "value": "Montevideo Standard Time", - "abbr": "MST", - "offset": -3, - "isdst": false, - "text": "(UTC-03:00) Montevideo", - "utc": [ - "America/Montevideo" - ] - }, - { - "value": "Bahia Standard Time", - "abbr": "BST", - "offset": -3, - "isdst": false, - "text": "(UTC-03:00) Salvador", - "utc": [ - "America/Bahia" - ] - }, - { - "value": "UTC-02", - "abbr": "U", - "offset": -2, - "isdst": false, - "text": "(UTC-02:00) Coordinated Universal Time-02", - "utc": [ - "America/Noronha", - "Atlantic/South_Georgia", - "Etc/GMT+2" - ] - }, - { - "value": "Mid-Atlantic Standard Time", - "abbr": "MDT", - "offset": -1, - "isdst": true, - "text": "(UTC-02:00) Mid-Atlantic - Old", - "utc": [] - }, - { - "value": "Azores Standard Time", - "abbr": "ADT", - "offset": 0, - "isdst": true, - "text": "(UTC-01:00) Azores", - "utc": [ - "America/Scoresbysund", - "Atlantic/Azores" - ] - }, - { - "value": "Cape Verde Standard Time", - "abbr": "CVST", - "offset": -1, - "isdst": false, - "text": "(UTC-01:00) Cape Verde Is.", - "utc": [ - "Atlantic/Cape_Verde", - "Etc/GMT+1" - ] - }, - { - "value": "Morocco Standard Time", - "abbr": "MDT", - "offset": 1, - "isdst": true, - "text": "(UTC) Casablanca", - "utc": [ - "Africa/Casablanca", - "Africa/El_Aaiun" - ] - }, - { - "value": "UTC", - "abbr": "UTC", - "offset": 0, - "isdst": false, - "text": "(UTC) Coordinated Universal Time", - "utc": [ - "America/Danmarkshavn", - "Etc/GMT", - "UTC" - ] - }, - { - "value": "GMT Standard Time", - "abbr": "GMT", - "offset": 0, - "isdst": false, - "text": "(UTC) Edinburgh, London", - "utc": [ - "Europe/Isle_of_Man", - "Europe/Guernsey", - "Europe/Jersey", - "Europe/London" - ] - }, - { - "value": "British Summer Time", - "abbr": "BST", - "offset": 1, - "isdst": true, - "text": "(UTC+01:00) Edinburgh, London", - "utc": [ - "Europe/Isle_of_Man", - "Europe/Guernsey", - "Europe/Jersey", - "Europe/London" - ] - }, - { - "value": "GMT Standard Time", - "abbr": "GDT", - "offset": 1, - "isdst": true, - "text": "(UTC) Dublin, Lisbon", - "utc": [ - "Atlantic/Canary", - "Atlantic/Faeroe", - "Atlantic/Madeira", - "Europe/Dublin", - "Europe/Lisbon" - ] - }, - { - "value": "Greenwich Standard Time", - "abbr": "GST", - "offset": 0, - "isdst": false, - "text": "(UTC) Monrovia, Reykjavik", - "utc": [ - "Africa/Abidjan", - "Africa/Accra", - "Africa/Bamako", - "Africa/Banjul", - "Africa/Bissau", - "Africa/Conakry", - "Africa/Dakar", - "Africa/Freetown", - "Africa/Lome", - "Africa/Monrovia", - "Africa/Nouakchott", - "Africa/Ouagadougou", - "Africa/Sao_Tome", - "Atlantic/Reykjavik", - "Atlantic/St_Helena" - ] - }, - { - "value": "W. Europe Standard Time", - "abbr": "WEDT", - "offset": 2, - "isdst": true, - "text": "(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna", - "utc": [ - "Arctic/Longyearbyen", - "Europe/Amsterdam", - "Europe/Andorra", - "Europe/Berlin", - "Europe/Busingen", - "Europe/Gibraltar", - "Europe/Luxembourg", - "Europe/Malta", - "Europe/Monaco", - "Europe/Oslo", - "Europe/Rome", - "Europe/San_Marino", - "Europe/Stockholm", - "Europe/Vaduz", - "Europe/Vatican", - "Europe/Vienna", - "Europe/Zurich" - ] - }, - { - "value": "Central Europe Standard Time", - "abbr": "CEDT", - "offset": 2, - "isdst": true, - "text": "(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague", - "utc": [ - "Europe/Belgrade", - "Europe/Bratislava", - "Europe/Budapest", - "Europe/Ljubljana", - "Europe/Podgorica", - "Europe/Prague", - "Europe/Tirane" - ] - }, - { - "value": "Romance Standard Time", - "abbr": "RDT", - "offset": 2, - "isdst": true, - "text": "(UTC+01:00) Brussels, Copenhagen, Madrid, Paris", - "utc": [ - "Africa/Ceuta", - "Europe/Brussels", - "Europe/Copenhagen", - "Europe/Madrid", - "Europe/Paris" - ] - }, - { - "value": "Central European Standard Time", - "abbr": "CEDT", - "offset": 2, - "isdst": true, - "text": "(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb", - "utc": [ - "Europe/Sarajevo", - "Europe/Skopje", - "Europe/Warsaw", - "Europe/Zagreb" - ] - }, - { - "value": "W. Central Africa Standard Time", - "abbr": "WCAST", - "offset": 1, - "isdst": false, - "text": "(UTC+01:00) West Central Africa", - "utc": [ - "Africa/Algiers", - "Africa/Bangui", - "Africa/Brazzaville", - "Africa/Douala", - "Africa/Kinshasa", - "Africa/Lagos", - "Africa/Libreville", - "Africa/Luanda", - "Africa/Malabo", - "Africa/Ndjamena", - "Africa/Niamey", - "Africa/Porto-Novo", - "Africa/Tunis", - "Etc/GMT-1" - ] - }, - { - "value": "Namibia Standard Time", - "abbr": "NST", - "offset": 1, - "isdst": false, - "text": "(UTC+01:00) Windhoek", - "utc": [ - "Africa/Windhoek" - ] - }, - { - "value": "GTB Standard Time", - "abbr": "GDT", - "offset": 3, - "isdst": true, - "text": "(UTC+02:00) Athens, Bucharest", - "utc": [ - "Asia/Nicosia", - "Europe/Athens", - "Europe/Bucharest", - "Europe/Chisinau" - ] - }, - { - "value": "Middle East Standard Time", - "abbr": "MEDT", - "offset": 3, - "isdst": true, - "text": "(UTC+02:00) Beirut", - "utc": [ - "Asia/Beirut" - ] - }, - { - "value": "Egypt Standard Time", - "abbr": "EST", - "offset": 2, - "isdst": false, - "text": "(UTC+02:00) Cairo", - "utc": [ - "Africa/Cairo" - ] - }, - { - "value": "Syria Standard Time", - "abbr": "SDT", - "offset": 3, - "isdst": true, - "text": "(UTC+02:00) Damascus", - "utc": [ - "Asia/Damascus" - ] - }, - { - "value": "E. Europe Standard Time", - "abbr": "EEDT", - "offset": 3, - "isdst": true, - "text": "(UTC+02:00) E. Europe", - "utc": [ - "Asia/Nicosia", - "Europe/Athens", - "Europe/Bucharest", - "Europe/Chisinau", - "Europe/Helsinki", - "Europe/Kiev", - "Europe/Mariehamn", - "Europe/Nicosia", - "Europe/Riga", - "Europe/Sofia", - "Europe/Tallinn", - "Europe/Uzhgorod", - "Europe/Vilnius", - "Europe/Zaporozhye" - - ] - }, - { - "value": "South Africa Standard Time", - "abbr": "SAST", - "offset": 2, - "isdst": false, - "text": "(UTC+02:00) Harare, Pretoria", - "utc": [ - "Africa/Blantyre", - "Africa/Bujumbura", - "Africa/Gaborone", - "Africa/Harare", - "Africa/Johannesburg", - "Africa/Kigali", - "Africa/Lubumbashi", - "Africa/Lusaka", - "Africa/Maputo", - "Africa/Maseru", - "Africa/Mbabane", - "Etc/GMT-2" - ] - }, - { - "value": "FLE Standard Time", - "abbr": "FDT", - "offset": 3, - "isdst": true, - "text": "(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius", - "utc": [ - "Europe/Helsinki", - "Europe/Kiev", - "Europe/Mariehamn", - "Europe/Riga", - "Europe/Sofia", - "Europe/Tallinn", - "Europe/Uzhgorod", - "Europe/Vilnius", - "Europe/Zaporozhye" - ] - }, - { - "value": "Turkey Standard Time", - "abbr": "TDT", - "offset": 3, - "isdst": false, - "text": "(UTC+03:00) Istanbul", - "utc": [ - "Europe/Istanbul" - ] - }, - { - "value": "Israel Standard Time", - "abbr": "JDT", - "offset": 3, - "isdst": true, - "text": "(UTC+02:00) Jerusalem", - "utc": [ - "Asia/Jerusalem" - ] - }, - { - "value": "Libya Standard Time", - "abbr": "LST", - "offset": 2, - "isdst": false, - "text": "(UTC+02:00) Tripoli", - "utc": [ - "Africa/Tripoli" - ] - }, - { - "value": "Jordan Standard Time", - "abbr": "JST", - "offset": 3, - "isdst": false, - "text": "(UTC+03:00) Amman", - "utc": [ - "Asia/Amman" - ] - }, - { - "value": "Arabic Standard Time", - "abbr": "AST", - "offset": 3, - "isdst": false, - "text": "(UTC+03:00) Baghdad", - "utc": [ - "Asia/Baghdad" - ] - }, - { - "value": "Kaliningrad Standard Time", - "abbr": "KST", - "offset": 3, - "isdst": false, - "text": "(UTC+02:00) Kaliningrad", - "utc": [ - "Europe/Kaliningrad" - ] - }, - { - "value": "Arab Standard Time", - "abbr": "AST", - "offset": 3, - "isdst": false, - "text": "(UTC+03:00) Kuwait, Riyadh", - "utc": [ - "Asia/Aden", - "Asia/Bahrain", - "Asia/Kuwait", - "Asia/Qatar", - "Asia/Riyadh" - ] - }, - { - "value": "E. Africa Standard Time", - "abbr": "EAST", - "offset": 3, - "isdst": false, - "text": "(UTC+03:00) Nairobi", - "utc": [ - "Africa/Addis_Ababa", - "Africa/Asmera", - "Africa/Dar_es_Salaam", - "Africa/Djibouti", - "Africa/Juba", - "Africa/Kampala", - "Africa/Khartoum", - "Africa/Mogadishu", - "Africa/Nairobi", - "Antarctica/Syowa", - "Etc/GMT-3", - "Indian/Antananarivo", - "Indian/Comoro", - "Indian/Mayotte" - ] - }, - { - "value": "Moscow Standard Time", - "abbr": "MSK", - "offset": 3, - "isdst": false, - "text": "(UTC+03:00) Moscow, St. Petersburg, Volgograd, Minsk", - "utc": [ - "Europe/Kirov", - "Europe/Moscow", - "Europe/Simferopol", - "Europe/Volgograd", - "Europe/Minsk" - ] - }, - { - "value": "Samara Time", - "abbr": "SAMT", - "offset": 4, - "isdst": false, - "text": "(UTC+04:00) Samara, Ulyanovsk, Saratov", - "utc": [ - "Europe/Astrakhan", - "Europe/Samara", - "Europe/Ulyanovsk" - ] - }, - { - "value": "Iran Standard Time", - "abbr": "IDT", - "offset": 4.5, - "isdst": true, - "text": "(UTC+03:30) Tehran", - "utc": [ - "Asia/Tehran" - ] - }, - { - "value": "Arabian Standard Time", - "abbr": "AST", - "offset": 4, - "isdst": false, - "text": "(UTC+04:00) Abu Dhabi, Muscat", - "utc": [ - "Asia/Dubai", - "Asia/Muscat", - "Etc/GMT-4" - ] - }, - { - "value": "Azerbaijan Standard Time", - "abbr": "ADT", - "offset": 5, - "isdst": true, - "text": "(UTC+04:00) Baku", - "utc": [ - "Asia/Baku" - ] - }, - { - "value": "Mauritius Standard Time", - "abbr": "MST", - "offset": 4, - "isdst": false, - "text": "(UTC+04:00) Port Louis", - "utc": [ - "Indian/Mahe", - "Indian/Mauritius", - "Indian/Reunion" - ] - }, - { - "value": "Georgian Standard Time", - "abbr": "GET", - "offset": 4, - "isdst": false, - "text": "(UTC+04:00) Tbilisi", - "utc": [ - "Asia/Tbilisi" - ] - }, - { - "value": "Caucasus Standard Time", - "abbr": "CST", - "offset": 4, - "isdst": false, - "text": "(UTC+04:00) Yerevan", - "utc": [ - "Asia/Yerevan" - ] - }, - { - "value": "Afghanistan Standard Time", - "abbr": "AST", - "offset": 4.5, - "isdst": false, - "text": "(UTC+04:30) Kabul", - "utc": [ - "Asia/Kabul" - ] - }, - { - "value": "West Asia Standard Time", - "abbr": "WAST", - "offset": 5, - "isdst": false, - "text": "(UTC+05:00) Ashgabat, Tashkent", - "utc": [ - "Antarctica/Mawson", - "Asia/Aqtau", - "Asia/Aqtobe", - "Asia/Ashgabat", - "Asia/Dushanbe", - "Asia/Oral", - "Asia/Samarkand", - "Asia/Tashkent", - "Etc/GMT-5", - "Indian/Kerguelen", - "Indian/Maldives" - ] - }, - { - "value": "Yekaterinburg Time", - "abbr": "YEKT", - "offset": 5, - "isdst": false, - "text": "(UTC+05:00) Yekaterinburg", - "utc": [ - "Asia/Yekaterinburg" - ] - }, - { - "value": "Pakistan Standard Time", - "abbr": "PKT", - "offset": 5, - "isdst": false, - "text": "(UTC+05:00) Islamabad, Karachi", - "utc": [ - "Asia/Karachi" - ] - }, - { - "value": "India Standard Time", - "abbr": "IST", - "offset": 5.5, - "isdst": false, - "text": "(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi", - "utc": [ - "Asia/Kolkata" - ] - }, - { - "value": "Sri Lanka Standard Time", - "abbr": "SLST", - "offset": 5.5, - "isdst": false, - "text": "(UTC+05:30) Sri Jayawardenepura", - "utc": [ - "Asia/Colombo" - ] - }, - { - "value": "Nepal Standard Time", - "abbr": "NST", - "offset": 5.75, - "isdst": false, - "text": "(UTC+05:45) Kathmandu", - "utc": [ - "Asia/Kathmandu" - ] - }, - { - "value": "Central Asia Standard Time", - "abbr": "CAST", - "offset": 6, - "isdst": false, - "text": "(UTC+06:00) Nur-Sultan (Astana)", - "utc": [ - "Antarctica/Vostok", - "Asia/Almaty", - "Asia/Bishkek", - "Asia/Qyzylorda", - "Asia/Urumqi", - "Etc/GMT-6", - "Indian/Chagos" - ] - }, - { - "value": "Bangladesh Standard Time", - "abbr": "BST", - "offset": 6, - "isdst": false, - "text": "(UTC+06:00) Dhaka", - "utc": [ - "Asia/Dhaka", - "Asia/Thimphu" - ] - }, - { - "value": "Myanmar Standard Time", - "abbr": "MST", - "offset": 6.5, - "isdst": false, - "text": "(UTC+06:30) Yangon (Rangoon)", - "utc": [ - "Asia/Rangoon", - "Indian/Cocos" - ] - }, - { - "value": "SE Asia Standard Time", - "abbr": "SAST", - "offset": 7, - "isdst": false, - "text": "(UTC+07:00) Bangkok, Hanoi, Jakarta", - "utc": [ - "Antarctica/Davis", - "Asia/Bangkok", - "Asia/Hovd", - "Asia/Jakarta", - "Asia/Phnom_Penh", - "Asia/Pontianak", - "Asia/Saigon", - "Asia/Vientiane", - "Etc/GMT-7", - "Indian/Christmas" - ] - }, - { - "value": "N. Central Asia Standard Time", - "abbr": "NCAST", - "offset": 7, - "isdst": false, - "text": "(UTC+07:00) Novosibirsk", - "utc": [ - "Asia/Novokuznetsk", - "Asia/Novosibirsk", - "Asia/Omsk" - ] - }, - { - "value": "China Standard Time", - "abbr": "CST", - "offset": 8, - "isdst": false, - "text": "(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi", - "utc": [ - "Asia/Hong_Kong", - "Asia/Macau", - "Asia/Shanghai" - ] - }, - { - "value": "North Asia Standard Time", - "abbr": "NAST", - "offset": 8, - "isdst": false, - "text": "(UTC+08:00) Krasnoyarsk", - "utc": [ - "Asia/Krasnoyarsk" - ] - }, - { - "value": "Singapore Standard Time", - "abbr": "MPST", - "offset": 8, - "isdst": false, - "text": "(UTC+08:00) Kuala Lumpur, Singapore", - "utc": [ - "Asia/Brunei", - "Asia/Kuala_Lumpur", - "Asia/Kuching", - "Asia/Makassar", - "Asia/Manila", - "Asia/Singapore", - "Etc/GMT-8" - ] - }, - { - "value": "W. Australia Standard Time", - "abbr": "WAST", - "offset": 8, - "isdst": false, - "text": "(UTC+08:00) Perth", - "utc": [ - "Antarctica/Casey", - "Australia/Perth" - ] - }, - { - "value": "Taipei Standard Time", - "abbr": "TST", - "offset": 8, - "isdst": false, - "text": "(UTC+08:00) Taipei", - "utc": [ - "Asia/Taipei" - ] - }, - { - "value": "Ulaanbaatar Standard Time", - "abbr": "UST", - "offset": 8, - "isdst": false, - "text": "(UTC+08:00) Ulaanbaatar", - "utc": [ - "Asia/Choibalsan", - "Asia/Ulaanbaatar" - ] - }, - { - "value": "North Asia East Standard Time", - "abbr": "NAEST", - "offset": 8, - "isdst": false, - "text": "(UTC+08:00) Irkutsk", - "utc": [ - "Asia/Irkutsk" - ] - }, - { - "value": "Japan Standard Time", - "abbr": "JST", - "offset": 9, - "isdst": false, - "text": "(UTC+09:00) Osaka, Sapporo, Tokyo", - "utc": [ - "Asia/Dili", - "Asia/Jayapura", - "Asia/Tokyo", - "Etc/GMT-9", - "Pacific/Palau" - ] - }, - { - "value": "Korea Standard Time", - "abbr": "KST", - "offset": 9, - "isdst": false, - "text": "(UTC+09:00) Seoul", - "utc": [ - "Asia/Pyongyang", - "Asia/Seoul" - ] - }, - { - "value": "Cen. Australia Standard Time", - "abbr": "CAST", - "offset": 9.5, - "isdst": false, - "text": "(UTC+09:30) Adelaide", - "utc": [ - "Australia/Adelaide", - "Australia/Broken_Hill" - ] - }, - { - "value": "AUS Central Standard Time", - "abbr": "ACST", - "offset": 9.5, - "isdst": false, - "text": "(UTC+09:30) Darwin", - "utc": [ - "Australia/Darwin" - ] - }, - { - "value": "E. Australia Standard Time", - "abbr": "EAST", - "offset": 10, - "isdst": false, - "text": "(UTC+10:00) Brisbane", - "utc": [ - "Australia/Brisbane", - "Australia/Lindeman" - ] - }, - { - "value": "AUS Eastern Standard Time", - "abbr": "AEST", - "offset": 10, - "isdst": false, - "text": "(UTC+10:00) Canberra, Melbourne, Sydney", - "utc": [ - "Australia/Melbourne", - "Australia/Sydney" - ] - }, - { - "value": "West Pacific Standard Time", - "abbr": "WPST", - "offset": 10, - "isdst": false, - "text": "(UTC+10:00) Guam, Port Moresby", - "utc": [ - "Antarctica/DumontDUrville", - "Etc/GMT-10", - "Pacific/Guam", - "Pacific/Port_Moresby", - "Pacific/Saipan", - "Pacific/Truk" - ] - }, - { - "value": "Tasmania Standard Time", - "abbr": "TST", - "offset": 10, - "isdst": false, - "text": "(UTC+10:00) Hobart", - "utc": [ - "Australia/Currie", - "Australia/Hobart" - ] - }, - { - "value": "Yakutsk Standard Time", - "abbr": "YST", - "offset": 9, - "isdst": false, - "text": "(UTC+09:00) Yakutsk", - "utc": [ - "Asia/Chita", - "Asia/Khandyga", - "Asia/Yakutsk" - ] - }, - { - "value": "Central Pacific Standard Time", - "abbr": "CPST", - "offset": 11, - "isdst": false, - "text": "(UTC+11:00) Solomon Is., New Caledonia", - "utc": [ - "Antarctica/Macquarie", - "Etc/GMT-11", - "Pacific/Efate", - "Pacific/Guadalcanal", - "Pacific/Kosrae", - "Pacific/Noumea", - "Pacific/Ponape" - ] - }, - { - "value": "Vladivostok Standard Time", - "abbr": "VST", - "offset": 11, - "isdst": false, - "text": "(UTC+11:00) Vladivostok", - "utc": [ - "Asia/Sakhalin", - "Asia/Ust-Nera", - "Asia/Vladivostok" - ] - }, - { - "value": "New Zealand Standard Time", - "abbr": "NZST", - "offset": 12, - "isdst": false, - "text": "(UTC+12:00) Auckland, Wellington", - "utc": [ - "Antarctica/McMurdo", - "Pacific/Auckland" - ] - }, - { - "value": "UTC+12", - "abbr": "U", - "offset": 12, - "isdst": false, - "text": "(UTC+12:00) Coordinated Universal Time+12", - "utc": [ - "Etc/GMT-12", - "Pacific/Funafuti", - "Pacific/Kwajalein", - "Pacific/Majuro", - "Pacific/Nauru", - "Pacific/Tarawa", - "Pacific/Wake", - "Pacific/Wallis" - ] - }, - { - "value": "Fiji Standard Time", - "abbr": "FST", - "offset": 12, - "isdst": false, - "text": "(UTC+12:00) Fiji", - "utc": [ - "Pacific/Fiji" - ] - }, - { - "value": "Magadan Standard Time", - "abbr": "MST", - "offset": 12, - "isdst": false, - "text": "(UTC+12:00) Magadan", - "utc": [ - "Asia/Anadyr", - "Asia/Kamchatka", - "Asia/Magadan", - "Asia/Srednekolymsk" - ] - }, - { - "value": "Kamchatka Standard Time", - "abbr": "KDT", - "offset": 13, - "isdst": true, - "text": "(UTC+12:00) Petropavlovsk-Kamchatsky - Old", - "utc": [ - "Asia/Kamchatka" - ] - }, - { - "value": "Tonga Standard Time", - "abbr": "TST", - "offset": 13, - "isdst": false, - "text": "(UTC+13:00) Nuku'alofa", - "utc": [ - "Etc/GMT-13", - "Pacific/Enderbury", - "Pacific/Fakaofo", - "Pacific/Tongatapu" - ] - }, - { - "value": "Samoa Standard Time", - "abbr": "SST", - "offset": 13, - "isdst": false, - "text": "(UTC+13:00) Samoa", - "utc": [ - "Pacific/Apia" - ] - } - ]; - - window.timezones = ubuntuTimezones.map(function (t) { - var detail = details.find(function (d) { - return d.utc.findIndex(function (n) { return n === t; }) !== -1; - }); - - if (!detail) return { id: t, display: t }; - - return { - id: t, - display: `(UTC${detail.offset < 0 ? '':'+'}${detail.offset}) ${t}` - } - }); - -})(); diff --git a/src/index.html b/src/index.html index 542cb7af7..d00463010 100644 --- a/src/index.html +++ b/src/index.html @@ -74,7 +74,7 @@ - +