Cannabis Ruderalis

Ahecht/Scripts/UTCLiveClock
Author(s)Ahecht
StatusStable
UpdatedFebruary 27, 2023
    (13 months ago)
SourceUser:Ahecht/Scripts/UTCLiveClock.js

This gadget adds a clock in the personal toolbar that shows the current time in UTC, and also provides a link to recursively purge the current page.

Based on: https://www.mediawiki.org/wiki/MediaWiki:Gadget-UTCLiveClock.js (Revision: July 2020), but modified to force a recursive link update.

Installation[edit]

Add the following line to Special:MyPage/common.js or meta:Special:MyPage/global.js to install:

mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:Ahecht/Scripts/UTCLiveClock.js&action=raw&ctype=text/javascript' ); // Linkback: [[User:Ahecht/Scripts/UTCLiveClock.js]]

Note: If you have the "Add a clock to the personal toolbar..." gadget turned on in Special:Preferences#mw-prefsection-gadgets, you should disable it to avoid having two clocks shown.

To have the time displayed in a timezone other than UTC, add the following to your Special:MyPage/common.js or meta:Special:MyPage/global.js instead:

window.LiveClockTimeZone = 'America/Los_Angeles';

Replace 'America/Los_Angeles with your local time zone. See List of tz database time zones for valid options (use the TZ database name).

See also[edit]

Leave a Reply