Template:UTC offset
Appearance
This template returns a UTC offset string suitable for use with the {{#time:}}
parser function:
{{UTC offset|MST}}
→ -6 hours
Usage
[edit]This template takes a single positional parameter that specifies the timezone for which the offset is desired. Valid parameter values are the same as those supported by {{time}}
.
Typical use of this template is with the {{#time:}}
parser function:
{{#time:H:i}}
→ 10:11 – UTC time{{UTC offset|MST}}
→ -6 hours – MST or MDT offset from UTC{{#time:H:i | {{UTC offset|MST}} }}
→ 04:11 – MST or MDT time
Supported time zones
[edit]This is a list of the currently supported time zone abbreviations:
- ACST (ACDT)
- AEST (AEDT)
- AKT (AKST) (AKDT)
- AoE[A]
- AT (AST) (ADT)
- AWST
- BST
- BT
- CET (CEST)
- ChST
- CT (CST) (CDT)
- EET (EEST)
- ET (EST) (EDT)
- GFT
- GMT
- GMT-IE[B]
- GMT-UK[C]
- HST (HDT)
- IDLE[A]
- IDLW[A]
- ILST[B]
- IRKT
- IRST
- IST[B]
- JST
- KALT (USZ1)
- KPT[D]
- KRAT
- KST
- KZT
- MAGT
- MMT
- MSK
- MST (MDT)
- MVT
- NPT
- NST (NDT)
- NZST (NZDT)
- OMST
- PETT
- PHT
- PKT
- PMST (PMDT)
- PT (PST) (PDT)
- SAMT
- SAST
- SLST
- SRET
- SST
- UTC
- VLAT
- WET (WEST)
- WGT (WGST)
- WIB
- WIT
- WITA
- YAKT
- YEKT
- ^ a b c Nonstandard time zone included for convenience.
- ^ a b c To differentiate between multiple time zones abbreviated as IST, the template uses IST for Indian Standard Time, GMT-IE for Irish Standard Time, and ILST for Israel Standard Time/Summer Time.
- ^ To differentiate between Bangladesh Standard Time (BST) and year-round GMT, the template uses GMT-UK for the United Kingdom.
- ^ To differentiate between Paraguay Time (PYT), the template uses KPT for Pyongyang Time.
Error messages
[edit]This template can emit three error messages:
- unknown timezone <unknown timezone> – this message emitted when <unknown timezone> is not a timezone known to Module:Time. To resolve this error, use a known timezone specifier.
- missing required timezone – this template requires a timezone specifier. To resolve this error, provide a known timezone specifier.
- error calculating dst timestamps – this template automatically applies daylight saving adjustment for those timezones that support it. This error message indicates that the underlying data in Module:Time/data for the timezone is malformed. To resolve this error, the underlying data must be corrected. This may be accomplished by anyone with administrator or template editor permission. Post a message at Template talk:Time.