Content deleted Content added
BrandonXLF (talk | contribs) No edit summary |
BrandonXLF (talk | contribs) No edit summary |
||
Line 358:
local args = getArgs (frame);
local utc_timestamp, timestamp; -- current or time timestamps; timestamp is local ST or DST time used in output
local data = 'Module:Time/data'..set_sandbox(frame) -- make a data module name; sandbox or live
data = mw.loadData (data); -- load the data module
cfg = data.cfg; -- get the configuration table
local tz_aliases = {}
local aliases_table = data.tz_aliases; -- get the aliases table
Line 382 ⟶ 377:
args[1] = 'utc'; -- default to utc
end
tz = tz_aliases[args[1]] and tz_data[tz_aliases[args[1]]] or tz_data[args[1]]; -- make a local copy of the timezone table from tz_data{}
Line 390 ⟶ 384:
end
return is_dst_active(timestamp,utc_timestamp) -- set is_dst to 0 or 1
end
Line 567 ⟶ 558:
]]
return {time = time
dst_active = dst_active,
}
|