Function and scope of the TOD Clock Calculator

The applet permits conversion between S/390 TOD clock values and human readable calendar values. TOD clock values may also be added and subtracted.

Support for daylight saving time and leap seconds is currently not provided in the applet. If your JVM supports leap seconds this will be reflected in the calendar display.

Parts of the TOD Clock Calculator Interface

The top section of the display shows the program identity and displays error messages when necessary.

The middle section of the display shows two TOD values in hex which may be added and subtracted.

In the top line of this section there is a text entry field labelled TOD 1. You may enter the characters 0-9, A-F into the text field.

The next line is a selection tool that lets you choose plus or minus.

The bottom line of the section is a text entry field labelled TOD 2 with the same behaviour as TOD 1.

The bottom section of the screen shows the result of adding or subtracting the two TOD values as a TOD and a Gregorian calendar value. There are also controls for manipulating the result and values of the two TODs in the middle section.

In the top line of this section is a subsection with Result = followed by the result of adding or subtracting the values of TOD 1 and TOD 2. To the right of this subsection are two buttons labelled toTOD 1 and toTOD 2, the functions of which are explained below.

Next is a line with a series of text entry fields which display and permit user entry of date, time and time zone called the date and time display which is the result TOD value as a Gregorian date and time.

On the bottom line of this section is a series of buttons to permit setting of interesting time values, explained below.

Manipulating the Date and Time Display

Alter the date or time in the date and time display, hit Return and it will be converted into a TOD in TOD 1, TOD 2 will be set to zero, and the result in TOD units displayed after Result =.

Changing the zone display in the date and time display from the default GMT alters the displayed date and time to correspond to the selected time zone. Note that available time zones are defined by the JVM under which the applet is running. Please consult your JVM documentation to find out what these time zones mean.

It is possible to enter 'invalid' numbers into the date and time display, such as setting the day number to 32. When you hit Return such dates will cause the month to roll forward (so 32 Jan will be redisplayed as 01 Feb). This is a convenience to permit month rollforward without having to alter two text entry fields.

If the values entered into the date and time display cannot be interpreted as a date or fall outside the TOD epoch an error message will be displayed.

Manipulating the TOD 1 and TOD 2 displays

Enter a 16-hex-nibble TOD value into TOD 1 or TOD 2, hit Return and the operation selected (plus or minus) will be applied to TOD 1 and TOD 2, the result displayed after the Result = and the date and time display will show this TOD value in human readable form.

If the addition or subtraction of TOD 1 and TOD 2 results in a value which falls outside the TOD epoch the result is limited to the TOD epoch.

If there are fewer than 16 characters in the TOD 1 or TOD 2 displays when you hit Return an error message will be displayed.

toTod 1 and toTod 2 buttons

Pressing the toTOD 1 button copies the value after the Result = into TOD 1, the result of the selected operation (plus or minus) with TOD 2 is calculated, the result is displayed after the Result = and the date and time display shows the resultant TOD value in human readable form.

Pressing the toTOD 2 button copies the value after the Result = into TOD 2, the result of the selected operation (plus or minus) with TOD 1 is calculated, the result is displayed after the Result = and the date and time display will show this TOD value in human readable form.

Time Setting buttons

Pressing the Now, Epoch begin, Epoch end or Java epoch buttons sets TOD 1 to the corresponding value and TOD 2 to zero. The result is displayed after the Result = and the date and time display will show this TOD value in human readable form.

Pressing the 1 us, 1 mS, 1 S, 1 h, 24 h, or 1 Y buttons sets TOD 2 to the corresponding value in TOD units and the operation selected (plus or minus) will be applied to TOD 1 and TOD 2, the result displayed after the Result = and the date and time display will show this TOD value in human readable form.

S/390 TOD Clock

See S/390 Principles of Operation DZ9AR006 SA22-7201-06 Section 4.6 Timing

A TOD clock unit (bit 63) is equivalent to approximately 244 picoseconds

Nominally, bit 51 is incremented every microsecond

The S/390 TOD clock will wrap at 23:53:47.370495714060 GMT 17th September 2042. Better convert all your code to ESTCK by then. See z/Architecture Principles of Operation DZ9ZR000 SA22-7832-00 Section 4.6 Timing

User requests to extend this applet to cope will be treated with the necessary urgency

Problems

The applet has been informally tested under:
Netscape Navigator 4.74 (Linux), 4.08, 4.7 (W32)
Internet Explorer 5.00.3103.1000, 5.00.2314.1003, 5.00.2314.1003IS (W32).

If you are an IE user and the applet's display becomes corrupted after scrolling please see http://support.microsoft.com/support/kb/articles/q214/7/80.asp

Licentiousness

This software is unsupported. When it works Geoff wrote it, otherwise the identity of the author is unknown.

'The software' is comprised of todapp.jar and this HTML document. William Data Systems ('WDS') grants you ('the user') a non-exclusive license to execute and display the software, which grant of licence may be withdrawn at any time and for any reason.
The license specifically prohibits:
i) Redistribution of the software under a different name or names
ii) Redistribution of any part or component of the software in isolation
iii) Alteration of any part or component of the software

THIS SOFTWARE, AND ALL ACCOMPANYING FILES, DATA AND MATERIALS, ARE DISTRIBUTED "AS IS" AND WITH NO WARRANTIES OF ANY KIND, WHETHER EXPRESS OR IMPLIED.

Good information management procedure dictates that any program be thoroughly tested with non-critical data before relying on it. The user must assume the entire responsibility of testing and risk of using this program.

IN NO EVENT SHALL WDS, OR ITS PRINCIPALS, SHAREHOLDERS, OFFICERS, EMPLOYEES, AFFILIATES, CONTRACTORS, SUBSIDIARIES, OR PARENT ORGANIZATIONS, BE LIABLE FOR ANY INCIDENTAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES WHATSOEVER RELATING TO THE USE OF THE SOFTWARE, OR YOUR RELATIONSHIP WITH WDS.

IN ADDITION, IN NO EVENT DOES WDS AUTHORIZE YOU TO USE THIS SOFTWARE WHETHER OR NOT UNDER THE TERMS OF THIS LICENSE IN APPLICATIONS OR SYSTEMS WHERE THE SOFTWARE'S FAILURE TO PERFORM CAN REASONABLY BE EXPECTED TO RESULT IN ANY PHYSICAL INJURY, OR IN LOSS OF LIFE. ANY SUCH USE BY YOU IS ENTIRELY AT YOUR OWN RISK, AND YOU AGREE TO HOLD WDS HARMLESS FROM ANY CLAIMS OR LOSSES RELATING TO SUCH UNAUTHORIZED USE.

(c) 2001 William Data Systems
All trademarks acknowleged
E&OE