World clock block
| World clock block | |
|---|---|
| Type | Block |
| Set | N/A |
| Downloads | https://moodle.org/plugins/block_worldclock |
| Issues | https://github.com/adamjenkins/moodle-block_worldclock/issues |
| Discussion | https://moodle.org/plugins/block_worldclock |
| Maintainer(s) | Adam Jenkins (WiseCat) |
The World clock block shows the current time in several timezones. It is useful for online courses whose students and teachers live in different parts of the world: everyone can see at a glance whether it is day or night for the others. It can be added to course pages, activities and the Dashboard.
Installation
Install the plugin from the Moodle plugins directory, or download the ZIP file and follow Installing plugins. The files go in the folder blocks/worldclock. The plugin supports Moodle 5.0 to 5.3.
Features

- Two ways to choose the timezones. Pick any timezones yourself, or let the block show every timezone used by the users enrolled in a course.
- Live clocks. The clocks update in the browser without reloading the page, and follow daylight saving time.
- In time order. Timezones are sorted by their current local date and time, earliest or latest first. Timezones with the same UTC offset are sorted by name.
- Display options for each block: 24-hour or 12-hour time, seconds, the date (always, or only when it differs from the viewer's own date), the UTC offset (for example UTC+9), a sun or moon icon, and a background colour by time of day: pink overnight, yellow in the morning and evening, and green during the day.
- A page can have several World clock blocks.
Adding and configuring the block

- Turn on edit mode and add the World clock block (see Blocks).
- Open the block's actions menu and choose Configure World clock block.
- Set the options below and click Save changes.
- Block title: replaces the default title, World clock.
- Timezones to display:
- Selected timezones: the timezones you choose in Timezones (hold Ctrl, or ⌘ on a Mac, to choose several).
- All timezones of users enrolled in a course: every timezone that the course's users have in their profile. On a course page this is that course; elsewhere, such as on the Dashboard, choose the Course. The person viewing the block needs permission to see the course's participants (moodle/course:viewparticipants), or the block shows nothing. Users who kept the default timezone are shown under the site's default timezone.
- Sort order: Ascending (earliest first) or Descending (latest first).
- Show UTC offset, Use 24-hour time format, Show seconds, Show date (with Only when different), Show day/night icon and Colour background by time of day.
Site settings

In Site administration > Plugins > Blocks > World clock you set the hours used by every World clock block on the site:
- Night start, Morning start, Day start and Evening start (defaults 23:00, 05:00, 08:00 and 20:00): when each background colour begins, for blocks with Colour background by time of day.
- Icon day start and Icon night start (defaults 06:00 and 18:00): when the icon changes between the sun and the moon, for blocks with Show day/night icon.
Capabilities
- block/worldclock:addinstance (Add a new world clock block): add the block to a course page or activity.
- block/worldclock:myaddinstance (Add a new world clock block to the My Moodle page): add the block to the Dashboard.
Privacy
The block stores only its own settings (a title, the mode, and a list of timezones or a course). In automatic mode it reads the timezone of the course's users to show the block, but never stores it.