Difference between revisions of "Template:Utc"
Jump to navigation
Jump to search
en>Primefac m (Protected "Template:Utc": semi-protecting highly-visible templates in response to recent template-space vandalism ([Edit=Require autoconfirmed or confirmed access] (indefinite) [Move=Require autoconfirmed or confirmed access] (indefinite))) |
m (1 revision imported) |
(No difference)
|
Latest revision as of 02:41, 2 January 2019
00:22
{{Utc}} takes the current UTC time from the server, and applies an optional time offset in hours (or hours and minutes). It returns the computed local time in 24-hour format (hh:mm).
- Syntax:
- {{Utc|[hours]|[minutes]}}
- The hours parameter (optional, default 0) is normally negative for America and West Pacific, it is null or positive in Europe, Africa, Asia and East Pacific.
- The minutes parameter (optional, default 0) is null for most timezones, but 30 minutes occur in some places, sometimes because of daylight. Use negative values for western timezones that need it.
- Non integer are accepted for both parameters, but this will be typically used only for hours offsets from UTC.
- Examples:
- {{Utc}} = "00:22".
- {{Utc|-4}} = "20:22".
- {{Utc|2}} = "02:22".
- {{Utc|6.5}} = "06:52".
- {{Utc|6|30}} = "06:52".
The above documentation is transcluded from Template:Utc/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. |