Merge pull request #362 from hnyman/luci-0.12

Luci 0.12: backport timezone data 2015c, update zoneinfo2lua.pl
This commit is contained in:
Jo-Philipp Wich 2015-04-19 13:14:18 +02:00
commit 982d0bc52b
3 changed files with 15 additions and 48 deletions

View file

@ -1,6 +1,6 @@
#!/usr/bin/perl
# zoneinfo2lua.pl - Make Lua module from /usr/share/zoneinfo
# Execute from within /usr/share/zoneinfo
# Execute from within root of Luci feed, usually feeds/luci
# $Id$
use strict;
@ -8,7 +8,7 @@ use strict;
my %TZ;
my $tzdin = $ARGV[0] || "/usr/share/zoneinfo";
my $tzdout = $ARGV[1] || "./libs/sys/luasrc/sys/zoneinfo";
my $tzdout = $ARGV[1] || "./modules/base/luasrc/sys/zoneinfo";
local $/ = "\012";
open( ZTAB, "< $tzdin/zone.tab" ) || die "open($tzdin/zone.tab): $!";
@ -51,16 +51,7 @@ open(O, "> $tzdout/tzdata.lua") || die "open($tzdout/tzdata.lua): $!\n";
print STDERR "Writing time zones to $tzdout/tzdata.lua ... ";
print O <<HEAD;
--[[
LuCI - Autogenerated Zoneinfo Module
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
]]--
-- Licensed to the public under the Apache License 2.0.
module "luci.sys.zoneinfo.tzdata"
@ -81,16 +72,7 @@ open (O, "> $tzdout/tzoffset.lua") || die "open($tzdout/tzoffset.lua): $!\n";
print STDERR "Writing time offsets to $tzdout/tzoffset.lua ... ";
print O <<HEAD;
--[[
LuCI - Autogenerated Zoneinfo Module
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
]]--
-- Licensed to the public under the Apache License 2.0.
module "luci.sys.zoneinfo.tzoffset"

View file

@ -1,13 +1,4 @@
--[[
LuCI - Autogenerated Zoneinfo Module
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
]]--
-- Licensed to the public under the Apache License 2.0.
module "luci.sys.zoneinfo.tzdata"
@ -24,7 +15,7 @@ TZ = {
{ 'Africa/Blantyre', 'CAT-2' },
{ 'Africa/Brazzaville', 'WAT-1' },
{ 'Africa/Bujumbura', 'CAT-2' },
{ 'Africa/Cairo', 'EET-2EEST,M4.5.5/0,M9.5.4/24' },
{ 'Africa/Cairo', 'EET-2EEST,M4.5.4/24,M9.5.4/24' },
{ 'Africa/Casablanca', 'WET0WEST,M3.5.0,M10.5.0/3' },
{ 'Africa/Ceuta', 'CET-1CEST,M3.5.0,M10.5.0/3' },
{ 'Africa/Conakry', 'GMT0' },
@ -237,18 +228,18 @@ TZ = {
{ 'Asia/Bishkek', 'KGT-6' },
{ 'Asia/Brunei', 'BNT-8' },
{ 'Asia/Chita', 'IRKT-8' },
{ 'Asia/Choibalsan', 'CHOT-8' },
{ 'Asia/Choibalsan', 'CHOT-8CHOST,M3.5.6,M9.5.6/0' },
{ 'Asia/Colombo', 'IST-5:30' },
{ 'Asia/Damascus', 'EET-2EEST,M3.5.5/0,M10.5.5/0' },
{ 'Asia/Dhaka', 'BDT-6' },
{ 'Asia/Dili', 'TLT-9' },
{ 'Asia/Dubai', 'GST-4' },
{ 'Asia/Dushanbe', 'TJT-5' },
{ 'Asia/Gaza', 'EET-2EEST,M3.5.4/24,M9.3.6/144' },
{ 'Asia/Hebron', 'EET-2EEST,M3.5.4/24,M9.3.6/144' },
{ 'Asia/Gaza', 'EET-2EEST,M3.5.5/24,M10.3.6/144' },
{ 'Asia/Hebron', 'EET-2EEST,M3.5.5/24,M10.3.6/144' },
{ 'Asia/Ho Chi Minh', 'ICT-7' },
{ 'Asia/Hong Kong', 'HKT-8' },
{ 'Asia/Hovd', 'HOVT-7' },
{ 'Asia/Hovd', 'HOVT-7HOVST,M3.5.6,M9.5.6/0' },
{ 'Asia/Irkutsk', 'IRKT-8' },
{ 'Asia/Jakarta', 'WIB-7' },
{ 'Asia/Jayapura', 'WIT-9' },
@ -291,7 +282,7 @@ TZ = {
{ 'Asia/Tbilisi', 'GET-4' },
{ 'Asia/Thimphu', 'BTT-6' },
{ 'Asia/Tokyo', 'JST-9' },
{ 'Asia/Ulaanbaatar', 'ULAT-8' },
{ 'Asia/Ulaanbaatar', 'ULAT-8ULAST,M3.5.6,M9.5.6/0' },
{ 'Asia/Urumqi', 'XJT-6' },
{ 'Asia/Ust-Nera', 'VLAT-10' },
{ 'Asia/Vientiane', 'ICT-7' },

View file

@ -1,13 +1,4 @@
--[[
LuCI - Autogenerated Zoneinfo Module
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
]]--
-- Licensed to the public under the Apache License 2.0.
module "luci.sys.zoneinfo.tzoffset"
@ -81,6 +72,7 @@ OFFSET = {
bnt = 28800, -- BNT
irkt = 28800, -- IRKT
chot = 28800, -- CHOT
chost = 32400, -- CHOST
ist = 19800, -- IST
bdt = 21600, -- BDT
tlt = 32400, -- TLT
@ -88,6 +80,7 @@ OFFSET = {
tjt = 18000, -- TJT
hkt = 28800, -- HKT
hovt = 25200, -- HOVT
hovst = 28800, -- HOVST
wib = 25200, -- WIB
wit = 32400, -- WIT
aft = 16200, -- AFT
@ -114,6 +107,7 @@ OFFSET = {
btt = 21600, -- BTT
jst = 32400, -- JST
ulat = 28800, -- ULAT
ulast = 32400, -- ULAST
xjt = 21600, -- XJT
vlat = 36000, -- VLAT
yekt = 18000, -- YEKT