Changes

Jump to navigation Jump to search
restore version from 2014 to see if it fixes the templates that depend on this one
<!--
HOW TO ADD A TIME ZONE

* Add a pipe (|) chain with all the abbreviations of the time zone,
including both the standard time abbreviation(s) and daylight saving
time abbreviation, ending the line with an equal sign (=) followed
by the hour offset from UTC during /standard/ time.

Example: |abbr1|abbr2|abbr3=-9

* Add the daylight saving time abbreviation (if any) to the pipe chain
in the expression near the bottom, but make sure that the last
abbreviation in the chain is still directly followed by '=1'.

* Update the documentation.

* Add the time zone to Template:Current_minute_offset_in_time_zone.

* Consider adding the time zone to Template:Daylight_saving_in_time_zone
to enable automatic DST adjustment. If DST is observed in the time zone
but the time zone has not been implemented in that template, then
please make a note in the documentation that automatic DST adjustment
is currently not supported for that time zone.

-->{{#expr:{{#switch:{{uc:{{{1|}}}}}

<!--Hawaii Standard Time-->
|HST=-10 <!--UTC-10 all year-->

<!--Hawaii-Aleutian Time-->
|HAT|HAST|HADT=-10

<!--Alaska Time-->
|AKT|AKST|AKDT=-9

<!--Pacific Time (Northern America)-->
|PT|PST|PDT=-8

<!--Mountain Time (Northern America)-->
|MT|MST|MDT=-7

<!--Saskatchewan Time (except Lloydminster, SK) (Canada)-->
|SKT|SKST=-6 <!--UTC-6 all year-->

<!--Central Time (Northern America)-->
|CT|CST|CDT=-6

<!--Eastern Time (Northern America)-->
|ET|EST|EDT=-5

<!--Atlantic Time-->
|AT|AST|ADT=-4

<!--Newfoundland Time-->
|NT|NST|NDT=-3

<!--Greenwich Mean Time / British Summer Time (same as WET / WEST)-->
|GMT|BST=0

<!--Western European Time-->
|WET|WEST=0

<!--Central European Time-->
|CET|CEST=1

<!--Eastern European Time-->
|EET|EEST=2

<!--Australian Western Time-->
|AWT|AWST=8 <!--UTC+8 all year-->

<!--Australian Central Time-->
|ACT|ACST|ACDT=9

<!--Australian Eastern Time-->
|AET|AEST|AEDT=10

<!--Korea Standard Time-->
|KST=9 <!--UTC+9 all year-->

<!--Japan Standard Time-->
|JST=9 <!--UTC+9 all year-->

<!--New Zealand Time-->
|NZT|NZST|NZDT=12

<!--default (input offset, or otherwise 0)-->
|{{#iferror:{{#time:H|-{{{1|0}}} hours}}|0|{{{1|0}}}}}
}}

{{#ifexpr:({{#ifeq:{{{dst|}}}|no|0|1}} <!--if automatic DST-->
and {{Daylight saving in time zone|{{uc:{{{1|}}}}}}} <!--then if DST is active-->
)
or ({{#ifeq:{{{dst|}}}|no|1|0}} <!--or, if no automatic DST-->
and {{#switch:{{uc:{{{1|}}}}}|HADT|AKDT|PDT|MDT|CDT|EDT|ADT|NDT|BST|WEST|CEST|EEST|ACDT|AEDT|NZDT=1|0}} <!--then if DST abbreviation is used-->
)
|+1 <!--+1 during DST-->
}}}}<noinclude>
{{documentation}}
[[Category:Date-computing templates based on current time]]</noinclude>
Anonymous user

Navigation menu