Your Moodle version

Blocks: Simple Clock

Maintained by My ugly mug Michael de Raadt
A simple JavaScript clock that highlights the time difference between a student and the Moodle server
Moodle 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8
  • 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 ugly mug
Michael de Raadt (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • My ugly mug
    Wed, Nov 14, 2012, 2:19 PM
    Hi, Alan.

    You're correct. I'm not sure that showing the adjusted time for the server time is a good idea. Most students wouldn't set a timezone. If I did adjust the time using the user's profile setting, I think it would be even more confusing. Two possibilities: introduce a third time (server time adjusted to user's time zone) or add a note somehow describing what times are shown.
  • Picture of marta gamez
    Sat, Aug 24, 2013, 5:04 AM
    Hola Michael, tengo un moodle 2.5 y agregue el simple clock, la pregunta es como puedo cambiarle los nombre de servidor y usted que es lo que me traduce por defecto ya que el idioma de mi moodle es español. Necesito que la referencia sea otra. Gracias por la ayuda que me pueda prestar.
  • My ugly mug
    Mon, Aug 26, 2013, 8:28 AM
    Hola, Marta.

    Yo he confiado en Google Traducir al leer su mensaje y escribir una respuesta, así que por favor me disculpe si he entendido mal su pregunta.

    El bloque se basa en cadenas de un archivo de idioma. Puede editar las cadenas a través de Moodle al ingresar como administrador y vaya a Administración del sitio> Idioma> Idioma personalización. Hay algo de documentación sobre cómo hacer esto aquí ... C3% B3n_del_idioma

    Aún mejor sería que te permite traducir las cadenas en el paquete de idioma distribuida. Esto puede ser compartida con todos los hablantes de la lengua. Ir a para más información.


    Hi, Marta.

    I've relied on Google Translate to read your message and write a reply, so please excuse me if I have misunderstood your question.

    The block draws on strings from a language file. You can edit the strings through Moodle by logging in as the administrator and navigating to Site admin > Language > Language customisation. There is some documentation on how to do this here...

    Even better would be for you to translate the strings in the distributed language pack. This can then be shared with all speakers of your language. Go to for more information.
  • Picture of Richard Charron
    Thu, Oct 17, 2013, 3:09 AM
    Hi Michael. Thank you for this very useful block. Is it possible to show the time in a 24 hour format ?
  • My ugly mug
    Fri, Oct 18, 2013, 4:31 PM
    Hi, Richard.

    That sounds like a reasonable improvement. If you create an improvement issue for the plugin on I will make the change.
  • Picture of Richard Charron
    Fri, Oct 18, 2013, 9:03 PM
    Thanks for your reaction, Michael. I juste created and improvement issue on for this improvement.
  • My ugly mug
    Fri, Nov 15, 2013, 6:37 PM
    Hi, all.

    I've just uploaded a new version with changes that were in a version that was lost when was rolled back. If you've downloaded this block in the last two days, you should download it again now.
  • Picture of Phil Makinson
    Mon, Apr 14, 2014, 11:45 PM
    Hey Michael! Just installed this on our site; and wondered if it would be possible to edit the text fields on the block. I want to be able to change the 'Server' name to something bespoke.

    If this is a relatively easy fix, I am happy to log an improvement on

  • My ugly mug
    Wed, Apr 16, 2014, 3:51 PM
    Hi, Phil.

    You can change this by altering the language string for this label. Go to Site admin > Language > Language customisation and load the strings for block_simple_clock.php and edit the sting for "server".
  • Picture of Najah Nasir
    Sun, Sep 7, 2014, 10:41 AM

    I tried installing this manually - downloaded the zip, unzipped it, uploaded it to the server - but I only manage to get to the 'Plugins Check' page. Was stated that it is 'To be installed'. I tried googling this but found nothing that could solve it.

    Please help, thank you.
  • My ugly mug
    Sun, Sep 7, 2014, 6:34 PM
    Hi, Najah.

    Thanks for trying the block. Be sure to install the block in the /blocks directory.

    Here's a guide for installation.
  • Picture of Chad Bergeron
    Thu, Oct 16, 2014, 4:23 AM
    I don't seem to be able to add this to the 'My Home' page (/my), only to a course page. Is that intentional?
  • My ugly mug
    Thu, Oct 16, 2014, 8:43 AM
    Hi, Chad.

    Thanks for pointing that out. It was unintentional. I've put in a fix and will upload a new version now. See details at
  • Picture of Jason Allshorn
    Mon, Nov 24, 2014, 6:32 PM
    My Moodle Clock is an hour and a few minutes wrong. I'm about 1km from the server, but it is lagging about 1 hour and 30 seconds behind. Please can I have some ideas as to why it would be like this.
  • My ugly mug
    Tue, Nov 25, 2014, 7:53 AM
    Hi, Jason.

    Calculating and maintaining a time difference is a complicated business. The way the Simple Clock block works is by attempting to determine the difference between your timezone and the timezone set for the server. This assumes that the server timezone and yours are set correctly in Moodle; this is what I would check. After that it only relies on computer's clock to maintain the time, in other words, to keep it ticking over. The time difference between the two times shown by default on the block should never grow.

1 2
Please login to post comments