Welcome to W3C time!
Each clock is an instance of the tz class, so it needs to have the file tz.class
accessible, tz.class in turn makes use of Clock.class so that file needs
to be in the same directory as tz.class. (It is possible to put the two files
in a jar file, which may save some download time.)
Paris
(Texas that is) |
The time at
MIT |
Holt (near
Trowbridge) |
Saint Tropez
& Mallorca |
The land of
the rising sun |
|
|
|
|
|
Here is an example applet for California (Pacific time):
<applet code="tz.class" width=150 height=220
align=right>
<param name="tz" value="PST">
<param name="language" value="en">
<param name="country" value="GB">
<param name="bgcolor" value="0000ff">
<param name="color" value="ffffff">
<param name="textcolor" value="ffff00">
<param name="daycolor" value="ffaaaa">
<param name="nightcolor" value="ffaaaa">
<param name="seconds" value="on">
<param name="style" value="3">
Your browser is not configured to show Java applets.
This would show a clock with the time in California.
</applet>
You can set the width and height attributes of the applet, and the clock
will fill the given space. However, the text (date, time and digits on the
dial) will not change size.
The parameters for the tz applet are:
-
tz
-
Timezone, values are: GMT (Greenwich Mean Time, a.k.a. UTC), BST
(British Standard Time, also valid for Portugal), ECT (Western Europe),
EET (Eastern Europe), ART (Egypt),
EAT (East Africa), MET (Middle East), NET (Near East), PLT (Pakistan/Lahore),
IST (India), BST (Bangladesh), VST (Vietnam), CTT (Taiwan), JST (Japan),
ACT (Australia Central), AET (Australia Eastern), SST (Solomon Islands),
NST (New Zealand), MIT (no, not Massachusetts, but Midway Islands), HST (Hawaii),
AST (Alaska), PST (US Pacific), PNT (Phoenix), MST (Mountain), CST (Central),
EST (Eastern), PRT (Puerto Rico), CNT (Newfoundland), AGT (Argentina), BET
(Brazil), CAT (central Africa)
-
language
-
Which language you want the digital time to be shown in. A two-letter code,
such as "en" for English.
-
country
-
Which local variant of the language you want, for example "GB" to get British
English.
-
bgcolor
-
The color of the applet outside of the clock dial itself; a hex number, such
as "ffffff" for white.
-
color
-
The color of the hour and minutes hand, but only in the day time. The color
will be automatically adjusted to keep enough contrast with the night color.
A hex color, such as "0000ff" for blue.
-
textcolor
-
The color for the digits and the seconds hand, also only in the day time.
A hex number, such as "000000" for black.
-
daycolor
-
The color of the dial at noon. the dial will change color every half hour,
gradually moving from the daycolor to the night color. (Often the colors
don't come out right, at least on NS 4beta under Solaris. I suspect some
problems in the color handling for Java, since NS4 also locks up when an
applet cannot get enough color cells on my 8bit display. Or maybe there is
a bug in my code...) A hex color such as "fff030" for a light yellow.
-
nightcolor
-
The color of the dial at midnight. A hex number such as "6040a0" for a slightly
purple blue.
-
seconds
-
Whether to display a seconds hand or not. Displaying the seconds hand makes
the Java VM work a lot harder. In MSIE4 it doesn't seem to matter, but Netscape
on Solaris slows annoyingly when there are five clock applets running that
update every second... The value is either "on" or "off".
-
style
-
The style for the date, either 0, 1, 2, or 3. Default is "2"
-
"0" = "Wednesday, 15 October 1997"
-
"1" = "15 October, 1997"
-
"2" = "15-Oct-97"
-
"3" = "15/10/97"
(Sources: tz.java and
Clock.java.
Copyright.)
Bert Bos
$Date: 2000/08/23 14:45:44 $