Jump to content

Template:T

From Wikinews, the free news source you can write!

0642 UTC

[edit] Template documentation

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:

00:00 BST (0000 UTC)

and {{T|1600|+0100}} produces:

00:00 UTC+0100 (0000 UTC)

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:

00:00 GMT (00:00 BST)

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 0642 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.