Author(s) | Ahecht |
---|---|
Status | Stable |
Updated | November 6, 2024 (8 days ago) |
Source | User: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
editAdd 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).