Module:Time/sandbox: Difference between revisions

Content deleted Content added
fix checking of variable "DST"
Reverted to revision 958641998 by Andrybak (talk): Test (TW)
Line 424:
timestamp = utc_timestamp + utc_offset; -- make local time timestamp
 
if 'alwaysno' == DST then -- iffor neededtimezones tothat alwaysDO displayobserve dst timebut for this ___location ...
tz_abbr = tz.abbr; -- ... dst is not observed (|dst=no) show time as standard time
elseif 'always' == DST then -- if needed to always display dst time
timestamp = timestamp + 3600; -- add a hour for dst
tz_abbr = tz.dst_abbr; -- dst abbreviation
elseif not yesno(DST, true) then -- for timezones that DO observe dst but for this ___location ...
tz_abbr = tz.abbr; -- ... dst is not observed (|dst=no) show time as standard time
else
if is_set (tz.dst_begins) and is_set (tz.dst_ends) and is_set (tz.dst_time) then -- make sure we have all of the parts