Skip to content


Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


By sunkid

Provides a clock and sun/moon dial widget to show the current time and "date" on an SMP world.

On startup and occasionally afterwards, the widget retrieves the current number of clicks (the 'Time' value from level.dat) from the server. It calculates the "date" based on converted wall-clock seconds since the epoch, where a wall-clock second is 72 seconds on a minecraft world. Between updates from the server, the time, date, and dial are updated using the browser's clock.


Static snapshot of a map generated with Minecraft-Overviewer with sundial widget.


This widget uses and depends on the following files that are not part of this distribution:

Additionally, you will have to have php installed on your server.


  1. download the distribution:

  2. unzip all files in your map's HTML directory; this directory must also contain the nbt.class.php file listed above under requirements

  3. edit your map's html file (e.g. index.html) and add the following

    1. Any HTML map:

      1. in the <head> section (you can skip the first line if jQuery is already there):

        <script type="text/javascript" src=""></script>
        <script type="text/javascript" src=""></script>
        <script type="text/javascript" src="sundial.js"></script>
        <link rel="stylesheet" href="sundial.css" type="text/css"/>
      2. in the <body> section right after the <div> containing the map:

        <div id="mcdial" class="mcdial">
        <img src="mask.png" id="mask">
        <img src="dial.png" id="dial">
        <div id="date" class="datetime">DATE</div>
        <div id="time" class="datetime">TIME</div>
        <div id="debug" class="datetime" style="visibility: hidden;">&nbsp;</div>
        <div id="sdcredits" class="datetime">
                <a class="sdlink" href="">minecraft sundial</a>
    2. Supported mapping tools:

      Check the util/ directory for supported tools and patches

  4. edit getServerTime.php script to point to your world's level.dat file

  5. test getServerTime.php by running:

    php getServerTime.php

    the output should look something like this:

  6. open your modified map from a browser and you should see the sundial in the top right corner.


This software is copyright by sunkid <> and is distributed under a dual license:

Non-Commercial Use:

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <>.

Commercial Use:
Please contact


A clock and dial widget for minecraft HTML maps







No releases published


No packages published