User:Thayts/Userboxes/DST in user time zone/doc
Appearance
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 or the clock image will refresh the time by purging your user page.
Usage
{{User:Styath/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 make 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. "CET" and "CEST") 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;
- 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);
If DST is not being observed in a certain time zone then it should not be necessary to use this parameter, since it has only effect on time zones where DST usually is being observed; - place is an optional parameter to add the name of the place where you live behind the text;
- 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 #444).
When no time zone or hour offset is given, the time shown will be UTC time.
Examples
Result | Code | |||
---|---|---|---|---|
|
{{User:Styath/Userboxes/DST in user time zone|CET}} | |||
|
{{User:Styath/Userboxes/DST in user time zone|CET|dst=no}} | |||
|
{{User:Styath/Userboxes/DST in user time zone|EST|12h=yes|place=New York City}} | |||
|
{{User:Styath/Userboxes/DST in user time zone|12|text=UTC in twelve hours}} | |||
|
{{User:Styath/Userboxes/DST in user time zone|4|30|text=in Afghanistan}} |