User:Thayts/Userboxes/DST in user time zone/doc

With this userbox you let everyone know what time it is at your place, simply by providing your time zone.

It makes use of the {{Current hour in time zone}} and {{Current minute in time zone}} templates, which automatically adjust the time according to daylight saving time (DST). Please refer to the documentation of those templates to see which time zones are supported. Instead of giving a time zone, an offset can also be given (see below).

Clicking the refresh icon will refresh the time by purging your user page.

Usage

edit
See below for examples.
{{User:Thayts/Userboxes/DST in user time zone |replace with time zone abbreviation or hour offset |replace with minute offset (only works if hour offset is used) |12h=no |24h=yes |dst=yes |place= |text=where this user lives |bg-c=#e2f2ff |border-c=#2475cd |text-c=#444444 |icon=File:Crystal Clear app clock.svg}}
Parameter Default value Possible values Description Required
Name Meaning
(1) time zone abbreviation[1] none any abbreviation supported by both {{Current hour in time zone}} and {{Current minute in time zone}} (e.g. EST) The abbreviation of your time zone. If dst=no, different types of abbreviations of the same time zone (e.g. CET and CEST) will produce different results. Otherwise (i.e. automatic daylight saving time adjustment is enabled, which is the default), the results will be the same and the abbreviations can be used interchangeably. yes[2]
or (1) hour offset[1] none any positive or negative whole number (e.g. -3, 1, 5) The hour offset from UTC time, given instead of a time zone abbreviation. Note that the time will not be automatically adjusted according to daylight saving time when using this option.
(2) minute offset 0 any positive or negative whole number (e.g. -30, 45) The minute offset from UTC+(hour offset) time. Has only effect when an hour offset is being used. no
12h 12-hour clock no yes or no Either parameter can be used to get a 12-hour clock instead of a 24-hour clock. no
24h 24-hour clock yes yes or no no
dst auto daylight saving time yes yes or no Automatic daylight saving time adjustment toggle. Use dst=no to disable the automatic adjustment; this affects the chosen time zone abbreviation type (as discussed above). Has only effect when a time zone abbreviation is being used and when DST is usually being observed in (part of) that time zone. no
place geographic place name none any place name, possibly wikilinked The name of the place where you live, for example, which will be added between parentheses behind the text. This also adds [[Category:Wikipedians in <place>]] to your user page if that category exists (but only if the place is not wikilinked). no
text alternative prose where this user lives any line of text Use to insert your own text. no
bg-c userbox background color #e2f2ff any web color Use to set a different background color. no
border-c userbox border color #2475cd any web color Use to set a different border color. no
text-c userbox text color #444444 any web color Use to set a different text color. no
icon clock icon File:Crystal Clear app clock.svg any image Use to set a different icon. no
  1. ^ a b When no (supported) time zone abbreviation or hour offset is given, the time shown will be UTC time.
  2. ^ Either a time zone abbreviation or hour offset should be given.

Examples

edit
Result Code
 It is approximately 01:39 where this user lives. 
{{User:Thayts/Userboxes/DST in user time zone|AET}}
 It is approximately 00:39 where this user lives. 
{{User:Thayts/Userboxes/DST in user time zone|AET|dst=no}}
 It is approximately 9:39 AM where this user lives (New York City). 
{{User:Thayts/Userboxes/DST in user time zone|EST|12h=yes|place=New York City}}
 It is approximately 02:39 UTC in twelve hours. 
{{User:Thayts/Userboxes/DST in user time zone|12|text=UTC in twelve hours}}
 It is approximately 19:09 in Afghanistan. 
{{User:Thayts/Userboxes/DST in user time zone|4|30|text=in Afghanistan}}
 It is approximately 10:09 in Venezuela. 
{{User:Thayts/Userboxes/DST in user time zone|-4|-30|text=in [[Venezuela]]}}