Welcome to Bob's Universal Decimal Time page

Bobulous Central → Universal Decimal Time

The UDT clock applets

What does the UDT clock mean?

It's very simple. The UDT clock applet shows the percentage of the day that has already passed, where zero is midnight by UTC (Coordinated Universal Time, which is centred on longitude zero on the globe).

At noon, Universal Time Coordinated, the UDT clock applet will show 50%0000. That is, fifty percent of the day has passed.

How does the UDT clock calculate the decimal time?

Again, very simply. (In fact, too simply.)

The clock works out how many milliseconds there are in a day (1000 * 60 * 60 * 24), and how many milliseconds have passed in this day so far (by Universal Time) then performs the calculation

(number of milliseconds passed) divided by (total number of milliseconds in a day)

and the result is the raw decimal value, e.g 0.5 at noon UTC, or 0.0 at midnight UTC. The raw decimal value is converted into a percentage (by multiplying by 100) to make it more understandable.

This gives a very simple method for calculating Universal Decimal Time, but is flawed because not every day has the same number of seconds. In fact, once a year or so, a day may have one or two 'leap seconds' added to it to make sure that Universal Time Coordinated is linked with the rotation of the Earth.

The UDT clock applet does not currently take into account these variations in day length. While this will only make a very slight difference to the value displayed, it does mean that the UDT clock applet is not suitable for very technical application.

What's the purpose of the UDT clock applet?

No point really. Bob just needed to practise his Java programming, and decided to make an applet that displayed the day in decimal form.

As Universal Time Coordinated is often used to give the time of astronomical events, events that are of potential interest to anyone on the globe, possibly Universal Decimal Time could be used to give the time of events that are available globally, on the Internet for instance. As the UDT clock shows a decimalised version of Universal Time Coordinated, and only Universal Time Coordinated, it does not vary its output from one timezone to another, so it could be used as a global clock for organising events such as live Web broadcasts.

Of course, UTC could be used anyway, but this might lead to confusion. Seeing, for instance, 21:30 UTC might trick people into forgetting that that time is for a certain timezone only, and they may miss the event. Seeing 90%0000 UDT should make it very clear that the given time is not in any local time.

But this is all speculation. It is very unlikely that the UDT clock will be used for anything more than decoration on a small number of Web pages.

Is this an original idea?

Certainly not. There are already many forms of decimal time. In fact, there are clocks that display the same decimalised UTC (or UT1 which is the astronomers' version), but in the raw decimal form (rather than as a friendly-looking percentage), but the value displayed should be essentially the same on such clocks.

There are also decimal clocks that do the same thing, but are zeroed on a different place (i.e not zeroed on midnight UTC). This seems like a bad idea, because Universal Time Coordinated is the scientific standard for worldwide time, and breaking standards leads to everlasting confusion. For instance, how do you interpret the following date: 01/02/03? A Scandinavian would read it as 2001 February 3rd. A Briton would read it as 1st February 2003. An American would read it as January 2nd 2003. Without agreeing on a standard, things often become effectively meaningless, so the UDT clock applet is sticking to UTC as its zero basis.

Can I put the Universal Decimal Time clock on my Web page?

Yes, but for it to display properly, the client that loads the page must be able to support Java 2. I don't know exactly what percentage of browsers support Java applets at the moment. Internet Explorer used to support it by default, then a legal case meant that native support was taken out, and people who still wanted to view Java applets had to download a patch or plug-in from Sun's Java Site.

I only mention this because you may not want a page that doesn't display on older browsers, or browsers that have not got a plug-in installed.

If you still want to put a call to the applet on your page, I think the best way to do it for now is to call for the applet directly from my Web site. The code to do this depends on which applet you want (text or graphical) and how you want it to appear:

The UDT clock, text display

<applet codebase="http://www.bobulous.org.uk/udt/" code="UDT_Display.class"
width="200" height="100">
<param name="textColor" value="ffff00" />
<param name="bgColor" value="0000ff" />
</applet>

(Note: the applet tag has been deprecated as of XHTML 1.0, but the replacement for it, the object tag, does not seem to work yet in the IE6 browser I'm using, so I assume strict XHTML has not been implemented by many yet.)

You can change some of the settings to suit your page. The width and height values can be set to what you see fit, but I recommend that the width is about twice the height. However, try various values and see what works for your page. A warning: Java applets are renowned for appearing very different from one system to another, so try to view your page on as many different platforms and browsers as possible if you are worried about it all appearing correctly.

The textColor and bgColor values must each be a hexadecimal RGB (red, green, blue) triplet, like the one you use in HTML to set the colour of fonts and page backgrounds. The effect of these settings is fairly self-explanatory: the text and digits on the clock depend on the textColor value, and the background of the clock space takes its colour from the bgColor setting. If either of these values is missing or is not correctly formatted, the clock will default to black text on a white background.

The graphical UDT clock

An alternative to the text output of the above applet is to use graphical images to display the digits. This will take longer to load in a browser (but I've optimized the graphics files to be as small as possible, so hopefully it will not take much longer) and may cause display problems on some systems, but when it does work, it can stand out much better than using text.

There is one graphical UDT applet, but it can be given a digitStyle parameter to specify which image set it uses.

LED graphic set

Supposed to look like a matrix of light-emitting diodes, but I'm no graphic artist, so please excuse the slightly basic style.

To call this version of the graphical applet, add the following to your page:

<applet codebase="http://www.bobulous.org.uk/udt/" code="Graphic_UDT_Display.class" width="165" height="110">
<param name="digitStyle" value="LED" />
<param name="bgColor" value="000000" />
</applet>

These statements are case-sensitive, so I recommend you copy and paste rather than type this in yourself. Again you can experiment with the parameter settings, but there is less point this time. Because the applet uses graphic icons for the text and digits, it can not really be scaled like the text applet can. However, if you want to try different values, you can set width and height - the applet will try to centre the graphics horizontally and vertically. Any space around the graphic icons will be filled by the bgColor value (an RGB-triplet as for the text applet), but as the background of the graphic icons is not transparent, it is probably best to leave this setting as it is. However, you may want to find out for yourself, and there's nothing stopping you.

SCRAWL graphic set

It's very difficult to produce elegant handwritten numbers and words using a mouse. The result was messy enough that I've called it scrawl.

To call this version of the graphical applet, add the following to your page:

<applet codebase="http://www.bobulous.org.uk/udt/" code="Graphic_UDT_Display.class" width="165" height="110">
<param name="digitStyle" value="SCRAWL" />
<param name="bgColor" value="ffffff" />
</applet>

As this is exactly the same graphical applet as called for the LED display, the same notes apply, but this time we have set the digitStyle parameter to "SCRAWL" and the bgColor to "ffffff" so that it has a white background.

Problems?

There are bound to be problems, aren't there? Try my e-mail page to see if I can be contacted (although it's been a while since there was a plain-and-simple e-mail address there) to let me know of any serious problems you've discovered. I am hoping to smarten up the applet soon, because at the moment it's not exactly smooth-looking.

Bobulous Central → Universal Decimal Time