Template:Utc/doc: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(One intermediate revision by one other user not shown) | |||
Line 2: | Line 2: | ||
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> | <!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> | ||
{{tl|{{PAGENAME}}}} 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''). | {{tl|{{PAGENAME}}}} 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<nowiki>:</nowiki> | ; Syntax<nowiki>:</nowiki> |
Latest revision as of 11:05, 1 August 2022
This is a documentation subpage for Template:Utc. It may contain usage information, categories and other content that is not part of the original template page. |
{{Utc/doc}} 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}}
= "19:57".{{Utc|-4}}
= "15:57".{{Utc|2}}
= "21:57".{{Utc|6.5}}
= "02:27".{{Utc|6|30}}
= "02:27".