Java based LST Clock Applet

jLSTclock, a java based clock with sidereal time display capability.

If you don't see a clock here, then your browser does not support Java. 

What is LST?

LST stands for 'Local Sidereal Time'. Normal (Solar) time like US Eastern, is based upon a 24 hour day, placing the Sun directly overhead at approximately the same time each day. If we measure the time between transits of a distant star we would find the time is slightly less than 24 hours, about 23 hours 56 minutes (in solar units). Why is this? The answer is because as our planet orbits the Sun, the Earth must rotate slightly more than one full-turn to 'see' the Sun transit. But the stars are far away, and essentially appear to be stationary. Local Sidereal midnight is defined to be when the first point of Aries passes directly overhead. Note that this depends on the location of the observer, hence the term 'local' sidereal time.
Parameter Possible Values Default Value
fontname  Any installed font (e.g. TimesRoman) TimeRoman
fontsize  Any valid point size (e.g. 12, 14, etc.) 14
mode  The string lst, utc or local lst
backgroundcolor  white, black, red, blue, green, yellow white
foregroundcolor  white, black, red, blue, green, yellow red
longitude  Observer longitude in decimal degrees West of Greenwich 0.0
lstfmt  LST time display format string (examples below) HH:mm:ss _LST_
utcfmt UTC time display format string HH:mm:ss _UTC_
localfmt Local time display format string HH:mm:ss zzz


Running jLSTclock as an application

The two example scripts, (bourne shell) or jLSTclock.bat are examples on how to run jLSTclock as an application under *nix and Windows respectiviely. In both cases, arguments should include an equal sign as a delimiter. For example, longitude should be specified as longitude=78.445 on the command line. You can customize the jLSTclock display, by using these scripts as a template, and add your own customizations.

Some additional features exist when jLSTclock is run as an application. If a mouse button is pressed when in the jLSTclock window, a popup menu is displayed, with options to change the display format from LST to UTC or local time. (I use this alot.) You can also use keystoke short cuts for this. Type L for LST, U for UTC and T for local time. The font size can be changed by pressing + or - . (Eventually I should make this automagic, when a window resize occurs.)

Time display format strings

The lstfmt, utcfmt and localfmt parameters accept the format string syntax used by the java.util.SimpleDateFormat class. One minor exception is that underscores will be treated (acutally converted) to single a single quote '. This is done, since verbatim text must be single quote delimited, and some OS's have problems passing single quotes as command line arguments.  A short description follows.

Time Format Syntax:

To specify the time format use a time pattern string. In this pattern, all ASCII letters are reserved as pattern letters, which are defined as the following:

      Symbol   Meaning                 Presentation        Example
      ------   -------                 ------------        -------
      G        era designator          (Text)              AD
      y        year                    (Number)            1996
      M        month in year           (Text & Number)     July & 07
      d        day in month            (Number)            10
      h        hour in am/pm (1~12)    (Number)            12
      H        hour in day (0~23)      (Number)            0
      m        minute in hour          (Number)            30
      s        second in minute        (Number)            55
      S        millisecond             (Number)            978
      E        day in week             (Text)              Tuesday
      D        day in year             (Number)            189
      F        day of week in month    (Number)            2 (2nd Wed in July)
      w        week in year            (Number)            27
      W        week in month           (Number)            2
      a        am/pm marker            (Text)              PM
      k        hour in day (1~24)      (Number)            24
      K        hour in am/pm (0~11)    (Number)            0
      z        time zone               (Text)              Pacific Standard Time
      '        escape for text         (Delimiter)
      ''       single quote            (Literal)           '
jLSTclock specific extensions:
      _        underscore              (Delimiter)         Some Text String
      yyyyy    Modified Julian Day     (Number)            51544 (lstfmt field only)

Examples Using the US Locale:

         Format Pattern                         Result
      --------------                         -------
      "yyyy.MM.dd G 'at' hh:mm:ss z"    ->>  1996.07.10 AD at 15:08:56 PDT
      "EEE, MMM d, ''yy"                ->>  Wed, July 10, '96
      "h:mm a"                          ->>  12:08 PM
      "hh 'o''clock' a, zzzz"           ->>  12 o'clock PM, Pacific Daylight Time
      "hh _o__clock_ a, zzzz"           ->>  12 o'clock PM, Pacific Daylight Time
      "K:mm a, z"                       ->>  0:00 PM, PST
      "yyyyy.MMMMM.dd GGG hh:mm aaa"    ->>  1996.July.10 AD 12:08 PM

Defaults for jLSTclock:

      Parameter         Format Pattern       Result
      ----------        --------------       ------------------------
      lstfmt            " HH:mm:ss _LST_ "    14:22:45 LST
      utcfmt            " HH:mm:ss _UTC_ "    11:51:22 UTC
      localfmt          " HH:mm:ss zzz "      06:51:22 EST

Running jLSTclock as an applet

To add a jLSTclock applet on a web page, just insert the following tags:
(Of course, customize as needed.)

<applet CODE="jlstclk.class" NAME="jLSTclock" WIDTH=450 HEIGHT=70>
<param NAME=fontname VALUE="Arial">
<param NAME=fontsize VALUE="16">
<param NAME=backgroundcolor VALUE="white">
<param NAME=foregroundcolor VALUE="red">
<param NAME=longitude VALUE="79.83888">
<param NAME=mode VALUE="lst">

If your interested in the source code it should be here.
The binary class and jar files, Windows batch file or bourne shell script are also available.
(Standard Disclaimers apply).

Other Notes:
This applet/application need java 1.1.1 or equivalent to run.
This applet/application uses a deprecated method of java.util.Date, but it will be some time before this causes any problems.
No swing or other "extra" java packages are required. Tested on Windows 98, Linux 6.0, Solaris 2.5.1 and 2.6.

Last Update January 1, 2000