Blocks: Simple Clock

Maintained by My mugMichael de Raadt
A simple JavaScript clock that highlights the time difference between a student and the Moodle server
1000 sites
24 fans
Current versions available: 3
  • A simple JavaScript clock
  • Highlights the time difference between a student and the Moodle server


  • Maintains time difference between page loads
  • Shows site icon and user image as clock icons


It is possible to achieve the following configurations.

  • Show server clock, user clock or both
  • Show seconds
  • Show day names
  • Show 12 or 24 hour time
  • Hide header/title
  • Hide clock icons
  • Change block title


Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4
Screenshot #5
Screenshot #6
Screenshot #7


My mug
Michael de Raadt (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS


  • My mug
    Fri, Oct 16, 2015, 10:53 AM
    I found that the new DateTimeZone object was already adjusting for daylight saving so my compensation for daylight saving was no longer necessary.

    I have created a new version that I hope will resolve this problem. Could you please test the new version (available on Git and in the here) and confirm this resolves your problem?

  • Picture of Jan Hofmann
    Fri, Oct 16, 2015, 2:21 PM
    Hi Michael,
    thanks for the update - is working for me, showing the correct time.

  • My mug
    Mon, Oct 19, 2015, 5:35 AM
    Thanks, Jan.
  • Picture of Gina Wilson
    Tue, Oct 18, 2016, 3:19 AM
    Is there any work being done on this for 3.1+? This would be a very useful block to use on our site.
    Thank you,
  • My mug
    Tue, Oct 18, 2016, 3:34 AM
    I haven't tested it yet, but it should still work. There's not too much in this block that is version specific.
  • Picture of Miguel Angel Velasquez Teran
    Fri, Dec 2, 2016, 6:33 AM
    Hello, are you going to update the plugin to work in Moodle 3.1.x?
  • My mug
    Tue, Dec 6, 2016, 10:43 AM

    I've just tested tested the latest release on Moodle 3.1 and 3.2 and it works as expected.


  • Picture of Verónica V.
    Tue, Feb 6, 2018, 6:23 AM
    Hi Michael, I am writing to consult you if you have plans to improve this plugin to versions 3.3 and 3.4.
    Best regards.
  • Picture of Alexander Deichman
    Tue, Feb 6, 2018, 8:18 AM
    Hi Veronica,
    I have the module running in 3.3 with no issues. I hope Michael will update the source accordingly soon.
    Can't say anything about 3.4 yet.
  • My mug
    Sun, Feb 18, 2018, 4:35 AM
    Hi, all.

    I haven't really changed much, but I did a code review and uploaded a new version for 2.9 to 3.4.
  • Picture of Verónica V.
    Wed, Jul 4, 2018, 7:24 AM
    Hi Michael, thanks for your plugin. Do you plan to upgrade to Moodle 3.5?
  • My mug
    Wed, Jul 4, 2018, 4:08 PM
    Hi, Veronica.

    It still seems to be working on 3.5, so I have added that version.

  • Picture of Verónica V.
    Thu, Jul 5, 2018, 4:29 AM
    thank you very much Michael!!!
  • Picture of Maximiliano Perez
    Tue, Jan 7, 2020, 7:32 AM
    Hi, can it use in moodle Moodle 3.7?
  • Picture of Alexander Deichman
    Tue, Jan 7, 2020, 9:26 AM
    @Maximilliano Perez It should work in 3.7 also. The code is so simple that it should simply work for a few versions to come. Caution: I haven't tested it yet beyond 3.6.3+
Please login to post comments