Difference between revisions of "Template:Current minute offset in time zone"
Jump to navigation
Jump to search
imported>Anthony Appleyard (rv histmerge junk) |
imported>JohnBlackburne (Reverted to revision 618802614 by Thayts (talk): Restore to version before disruptive edits, to try and fix Userbox errors. (TW)) |
||
| Line 1: | Line 1: | ||
| − | {{offset|{{{1| | + | <!-- |
| + | 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 minute offset from UTC during /standard/ time. | ||
| + | |||
| + | Example: |abbr1|abbr2|abbr3=-30 | ||
| + | |||
| + | * Update the documentation. | ||
| + | |||
| + | * Add the time zone to Template:Current_hour_offset_in_time_zone. | ||
| + | |||
| + | |||
| + | NOTE: Time zones with 0 offset are included for completeness. | ||
| + | |||
| + | -->{{#switch:{{uc:{{{1|}}}}} | ||
| + | |||
| + | <!--Hawaii Standard Time--> | ||
| + | |HST=0 | ||
| + | |||
| + | <!--Hawaii-Aleutian Time--> | ||
| + | |HAT|HAST|HADT=0 | ||
| + | |||
| + | <!--Alaska Time--> | ||
| + | |AKT|AKST|AKDT=0 | ||
| + | |||
| + | <!--Pacific Time (Northern America)--> | ||
| + | |PT|PST|PDT=0 | ||
| + | |||
| + | <!--Mountain Time (Northern America)--> | ||
| + | |MT|MST|MDT=0 | ||
| + | |||
| + | <!--Saskatchewan Time (except Lloydminster, SK) (Canada)--> | ||
| + | |SKT|SKST=0 | ||
| + | |||
| + | <!--Central Time (Northern America)--> | ||
| + | |CT|CST|CDT=0 | ||
| + | |||
| + | <!--Eastern Time (Northern America)--> | ||
| + | |ET|EST|EDT=0 | ||
| + | |||
| + | <!--Atlantic Time--> | ||
| + | |AT|AST|ADT=0 | ||
| + | |||
| + | <!--Newfoundland Time--> | ||
| + | |NT|NST|NDT=-30 | ||
| + | |||
| + | <!--Greenwich Mean Time / British Summer Time (same as WET / WEST)--> | ||
| + | |GMT|BST=0 | ||
| + | |||
| + | <!--Western European Time--> | ||
| + | |WET|WEST=0 | ||
| + | |||
| + | <!--Central European Time--> | ||
| + | |CET|CEST=0 | ||
| + | |||
| + | <!--Eastern European Time--> | ||
| + | |EET|EEST=0 | ||
| + | |||
| + | <!--Australian Western Time--> | ||
| + | |AWT|AWST=0 | ||
| + | |||
| + | <!--Australian Central Time--> | ||
| + | |ACT|ACST|ACDT=30 | ||
| + | |||
| + | <!--Australian Eastern Time--> | ||
| + | |AET|AEST|AEDT=0 | ||
| + | |||
| + | <!--Korea Standard Time--> | ||
| + | |KST=0 | ||
| + | |||
| + | <!--Japan Standard Time--> | ||
| + | |JST=0 | ||
| + | |||
| + | <!--New Zealand Time--> | ||
| + | |NZT|NZST|NZDT=0 | ||
| + | |||
| + | <!--default (input offset, or otherwise 0)--> | ||
| + | |{{#iferror:{{#time:i|-{{{1|0}}} minutes}}|0|{{{1|0}}}}} | ||
| + | }}<noinclude> | ||
| + | {{documentation}} | ||
| + | [[Category:Date-computing templates based on current time]]</noinclude> | ||
Latest revision as of 09:12, 21 August 2018
0
This template gives the current minute offset from UTC time for the given time zone.
It can be used in conjunction with {{Current hour offset in time zone}} to calculate the current time in a particular time zone. See below for the currently supported time zones.
Contents
Usage
{{Current minute offset in time zone|time zone}}
where
- time zone is the desired time zone abbreviation (see below and also the list of time zone abbreviations);
If no time zone is given or if the given time zone is not supported, then the output will default to 0;
In this case, instead of giving a time zone, an offset (e.g. -30, 45, etc.) can also be given;
This exact offset will then be used as the output (this functionality is merely included for template compatibility).
Supported time zones
Currently the following time zones are supported:
| Name | Notes | ||||
|---|---|---|---|---|---|
| HST | Hawaii Standard Time | UTC−10:00 | The minute offset of standard time does not differ from the minute offset of daylight saving time (DST; if applicable). | ||
| HAT or HAST | HADT | Hawaii-Aleutian Standard/Daylight Time | UTC−10:00 | UTC−09:00 | |
| AKT or AKST | AKDT | Alaska Standard/Daylight Time | UTC−09:00 | UTC−08:00 | |
| PT or PST | PDT | Pacific Standard/Daylight Time | UTC−08:00 | UTC−07:00 | |
| MT or MST | MDT | Mountain Standard/Daylight Time | UTC−07:00 | UTC−06:00 | |
| SKT or SKST | Saskatchewan Standard Time | UTC−06:00 | |||
| CT or CST | CDT | Central Standard/Daylight Time | UTC−06:00 | UTC−05:00 | |
| ET or EST | EDT | Eastern Standard/Daylight Time | UTC−05:00 | UTC−04:00 | |
| AT or AST | ADT | Atlantic Standard/Daylight Time | UTC−04:00 | UTC−03:00 | |
| NT or NST | NDT | Newfoundland Standard/Daylight Time | UTC−03:30 | UTC−02:30 | |
| GMT | BST | Greenwich Mean Time / British Summer Time |
UTC+00:00 | UTC+01:00 | |
| WET | WEST | Western European (Summer) Time | UTC+00:00 | UTC+01:00 | |
| CET | CEST | Central European (Summer) Time | UTC+01:00 | UTC+02:00 | |
| EET | EEST | Eastern European (Summer) Time | UTC+02:00 | UTC+03:00 | |
| AWT or AWST | Australian Western Standard Time | UTC+08:00 | |||
| ACT or ACST | ACDT | Australian Central Standard/Daylight Time | UTC+09:30 | UTC+10:30 | |
| AET or AEST | AEDT | Australian Eastern Standard/Daylight Time | UTC+10:00 | UTC+11:00 | |
| KST | Korea Standard Time | UTC+09:00 | |||
| JST | Japan Standard Time | UTC+09:00 | |||
| NZT or NZST | NZDT | New Zealand Standard/Daylight Time | UTC+12:00 | UTC+13:00 | |
Time zone map
Examples
*{{Current minute offset in time zone|CET}}
produces
- 0
*{{Current minute offset in time zone|ACT}}
produces
- 30
*{{Current minute offset in time zone|NT}}
produces
- -30
*{{Current minute offset in time zone|45}}
produces
- 45
*{{Current minute offset in time zone}}
produces
- 0
Related templates
Current time
Current offset
Daylight savings
- {{Daylight saving active}} (0 when false, 1 when true)
| The above documentation is transcluded from Template:Current minute offset in time zone/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |
