الگو:Utc/doc

از ویکی‌پدیا، دانشنامهٔ آزاد.

This is the template documentation page for الگو:Utc.

This page is not necessarily intended to be viewed directly. If it uses variables, some links may appear broken. Do not replace these variables with hardcoded page names or URLs.


{{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:
{{Template: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:
{{Template:Utc}} = "۱۷:۳۲".
{{Template:Utc|-4}} = "۱۳:۳۲".
{{Template:Utc|2}} = "۱۹:۳۲".
{{Template:Utc|6.5}} = "۰۰:۰۲".
{{Template:Utc|6|30}} = "۰۰:۰۲".