Jump to content

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

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Thayts (talk | contribs) at 22:43, 12 October 2012. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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

{{User:Thayts/Userboxes/DST in user time zone |time zone or hour offset [|minute offset] [|12h=yes] [|24h=no] [|dst=no] [|place=name] [|text=replacement] [|bg-c=color] [|border-c=color] [|text-c=color] }}
('[...]' means 'optional', do not include the square brackets when using this userbox)

where

  • time zone is the abbreviation of your time zone (see the documentation of {{Current hour in time zone}} and {{Current minute in time zone}} for a list, please be sure that your time zone is supported by both of them);
    If automatic daylight saving time adjustment is not disabled using the dst parameter (i.e. the parameter is not used), then both the standard time and daylight saving time abbreviations of a particular time zone (e.g. "EST" (or "ET") and "EDT") can be used interchangeably;
  • hour offset can be used instead of time zone to get the hour of UTC+(hour offset) time, where hour offset is a number (e.g. -3, 1, 5, etc.);
    This means that a number can be given instead of a time zone abbreviation;
    Please note that when using this option the time will not be adjusted according to daylight saving time;
  • minute offset is an optional parameter that can only be used when hour offset is being used;
    Like hour offset, it should be a number (e.g. -30, 45) which is the number of minutes that is added to UTC+(hour offset) time;
  • 12h and 24h are optional parameters of which either can be used to get a 12-hour clock instead of a 24-hour clock by setting the value to "yes" or "no" respectively;
    • defaults are "no" and "yes" respectively;
  • dst is an optional parameter to disable automatic daylight saving time adjustment by setting the value to "no" (has only effect when time zone is being used and when DST is usually being observed in (part of) that time zone);
    • default is "yes", making automatic DST adjustment the default regardless of whether the time zone's standard time abbreviation or the DST abbreviation is used (e.g. "EST" and "EDT" will both have the same effect);
  • place is an optional parameter to add the name of the place where you live behind the text;
    This also adds [[Category:Wikipedians in <place>]] to your user page if that category exists;
  • text is an optional parameter to insert your own text instead of "where this user lives";
  • bg-c is an optional parameter to set the background color;
    • default is #e2f2ff;
  • border-c is an optional parameter to set the border color;
    • default is #2475cd;
  • text-c is an optional parameter to set the text color;
    • default is #444444.

When no (supported) time zone or hour offset is given, the time shown will be UTC time.

Examples

Result Code
View this userbox's documentationIt is approximately 20:54 where this user lives.Refresh the time
{{User:Thayts/Userboxes/DST in user time zone|CET}}
View this userbox's documentationIt is approximately 19:54 where this user lives.Refresh the time
{{User:Thayts/Userboxes/DST in user time zone|CET|dst=no}}
View this userbox's documentationIt is approximately 2:54 PM where this user lives (New York City).Refresh the time
{{User:Thayts/Userboxes/DST in user time zone|EST|12h=yes|place=New York City}}
View this userbox's documentationIt is approximately 06:54 UTC in twelve hours.Refresh the time
{{User:Thayts/Userboxes/DST in user time zone|12|text=UTC in twelve hours}}
View this userbox's documentationIt is approximately 23:24 in Afghanistan.Refresh the time
{{User:Thayts/Userboxes/DST in user time zone|4|30|text=in Afghanistan}}
View this userbox's documentationIt is approximately 14:24 in Venezuela.Refresh the time
{{User:Thayts/Userboxes/DST in user time zone|-4|-30|text=in [[Venezuela]]}}