Template:T
1938 UTC
This template is used to automatically convert a time from a local time zone to UTC. It takes multiple parameters in various combinations:
{{T|local time|offset from UTC}}
{{T|local time|z=time zone abbreviation}}
(preferred)
For example, {{T|1600|z=BST}}
produces:
and {{T|1600|+0100}}
produces:
Half-hour (and quarter-hour) offsets should also work, but don't:
- 00:00 Sandringham (0000 UTC)
It also accepts a time as an optional third parameter, in case the template works it out wrong (as happens, for example, with half-hour offsets as mentioned above, or sometimes where two time zones share a code). The fourth parameter can be used to specify a different time zone, instead of UTC, but in these cases the time must be entered into the third parameter manually. Thus {{T|1600|z=GMT|3=1700|4=BST}}
produces:
The time zone codes for both parameters are automatically linked to the relevant English Wikipedia article. Where no Wikipedia article exists, an <abbr>
tag, with the full name of the time zone as the title text, is used. Hence {{T|1600|z=GMT|3=1900|4=AST}}
produces:
- 00:00 GMT (00:00 AST)
Using the template with no parameters should produce the current time in UTC, so {{T}}
outputs 1938 UTC.
Note: Times and offsets must be entered as four-digit 24-hour numbers with no colon. Hence 7:00pm must be entered as 1900
and an offset of one hour as +0100
or -0100
.