home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
time868f.zip
/
TIME868.HLP
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
1996-12-11
|
29KB
|
761 lines
ΓòÉΓòÉΓòÉ 1. TIME868 Version 6 ΓòÉΓòÉΓòÉ
Use TIME868 to set your system clock using the Time Protocol. This protocol is
accurate to plus or minus one second. A variety of features support several
modes of operation for both permanent and dial-up access to time servers.
TIME868 also operates as a Time Server for redistribution of accurate time to
local clients.
TIME868 provides a graph of the adjustments made for visual reference.
Related Information:
Choosing a time server
Setting up the program
TZ environment variable
Dialog fields
Providing a time server
USNO time server
National Institute of Standards and Technology
About the Time Protocol
Registering
Change History
Copyright 1995,1996 Norbert Dey
ΓòÉΓòÉΓòÉ 2. Choosing a time server ΓòÉΓòÉΓòÉ
The basic reason for synchronizing your computer's clock is so that your value
for a particular increment of time is the same or very close to the value used
by your colleagues.
You have two basic choices: everyone can synchronize to the same clock or
everyone can synchronize to one of several standard clocks.
If you have no need for the exact standard value for the time, everyone simply
can synchronize to a conveniently available clock. In many applications, only a
comparison of times is necessary ... this file was created after that file ...
and so forth. As long as the clock is accurate to ordinary human standards (a
minute or so), this is sufficient.
If it is impractical for all of your colleagues to synchronize to the same
clock, you will need to find a server which itself is traceable to a precise
standard clock.
Some Internet service providers and larger institutions will provide time
service which is synchronized to a standard time source. If you have a local
source of accurate time, it is your best choice for a time server.
All of the servers listed by this program are Stratum 2 or better in NTP terms.
This means that they are normally very good clocks. (Sometimes they may have
problems and drift off. A suspicious time should be checked against another
server.)
Not all of the servers listed provide service on both TCP and UDP protocols. If
one protocol does not work, try the other. If both are provided, UDP will
generally give the best results.
Another factor in the choice is the distance to the server in network time. A
server with a long delay will give poorer results than a server with a short
delay. Long delays are perhaps due to network congestion over that route and
therefore will be quite variable. Since the time value returned by the server
is the time at which the packet left the server, its accuracy depends on a
quick trip to your system.
The network latency is reported in the log. This is calculated as 1/2 of the
total round trip on the assumption that the delay is symmetrical. The latency
is taken into account when computing the variance.
A useful comparison is the difference between the latency of the selected
server and your Internet provider or gateway. I typically get 74ms latencies to
my service provider over a 28.8 modem.
If you are operating through a firewall, your firewall system itself may be the
only outside time source, even if you have limited access to other services.
ΓòÉΓòÉΓòÉ 3. TZ Variable ΓòÉΓòÉΓòÉ
The TZ variable is set by a line in the config.sys file. This information
corresponds to the IBM definition for the TZ variable in OS/2.
If you are in the continental USA, use one of these:
set TZ=PST8PDT
set TZ=MST7MDT
set TZ=CST6CDT
set TZ=EST5EDT
set TZ=AST4ADT
Some other countries for examples:
Israel: set TZ=IST-2IDT,4,3,6,3600,10,1,6,7200,3600
Italy: set TZ=CET-1CDT,3,-1,0,7200,10,-1,0,10800,3600
Newfoundland: set TZ=NST3:30NDT
New Zealand: set TZ=NZS12NZD,9,4,0,3600,3,4,0,7600,3600
Peru: set TZ=EST5EST,1,0,0,3600,2,0,0,3600,0
Singapore: set TZ=SST-8SST,1,1,1,0,1,1,1,0,0
Some countries and parts of the USA do not change time during the summer. For
these, use the following form:
set TZ=AAAOAAA,1,1,1,0,1,1,1,0,0
where AAA is the name of the time zone (MST for Mountain Standard Time, CST
for Central Standard Time, SST for Singapore Standard Time) and O is the
offset from UTC/GMT.
Otherwise you can construct your own TZ variable from the following
information. The string is composed of 10 parameters, separated by commas. The
first parameter is SSSnDDD where SSS is a 3-character label for standard
(winter) time. This is usually all letters, but can contain digits and blanks
after the first character. DDD is a corresponding label for daylight savings
time (summer time).
The n between the SSS and DDD is the number of hours UTC is different from
your local time (UTC - local time). Use +n or -n as appropriate.
If your local time zone is not an even number of hours from UTC, you may use
the form [+/-]hh:mm:ss. For example, PST+8:00:00PDT.
The remaining parameters deal with the dates and times when the change is made
to summer time and back to winter time. If your time changes follow the USA
rules, then you do not need to supply the remainder of the parameters.
Otherwise you need to supply them all. If only a portion of the additional
parameters are supplied, the whole set will be ignored and they will appear to
be totally ineffective.
Parameters 2-5 describe the start of summer time.
Parameter 2 The starting month of summer time (1-12).
Parameter 3 The starting week of summer time according to the following list:
1 - the first week of the month
2 - the second week of the month
3 - the third week of the month
4 - the fourth week of the month
0 - the change occurs on a specific day of the month
-1 - the last week of the month
-2 - the next to last week of the month
-3 - the second to last week of the month
-4 - the third to last week of the month
Parameter 4 The starting day of summer time. The day of the month (1-31) if
parameter 3 was 0, otherwise the day of the week (0-6).
Parameter 5 The starting time-of-day (local time) in seconds. (3600 seconds is
1AM.)
Parameters 6-9 describe the end of summer time.
Parameter 6 The starting month of winter time.
Parameter 7 The starting week of winter time (coded like parameter 3.)
Parameter 8 The starting day of winter time. The day of the month (1-31) if
parameter 7 was 0, otherwise the day of the week (0-6).
Parameter 9 The starting time-of-day (local summer time) in seconds. (7200
seconds is 2AM.)
Parameter 10 The final parameter specifies the amount of time shift in seconds
(3600 = 1 hour.)
For example, I could use:
set TZ=PST+8PDT,4,1,0,3600,10,-1,0,7200,3600
In ordinary language, this reads as: Winter time is called 'PST' and summer
time is called 'PDT'. I am 8 hours West of the zero meridian. Summer time
starts on the first Sunday of April at 0100 local time. Summer time ends on
the last Sunday of October at 0200 local time. When summer time is in effect,
one hour (3600 seconds) is added to local time.
Note: EMX-based programs have a different format for the TZ variable. If you
use EMX programs, you can set that variable with the name EMXTZ. If the
variable EMXTZ is available, the EMX programs will use it in preference to the
TZ variable.
ΓòÉΓòÉΓòÉ 4. Dialog fields ΓòÉΓòÉΓòÉ
The following panels describe the dialog fields.
Site selection
Hostname of reference server
IP address of server
TCP Protocol support
UDP Protocol support
Log text window
Graph of history
Delay for Auto-run
Interval between samples
Run button
Help button
Auto-run feature
Continuous running
TZ environment variable
Current site Change the name
Retry count
Log activity to a file
Log file name
Server enable for UDP
Log Clients by IP (and name)
Start Minimized
Persistent retry
Limit maximum adjustment
ΓòÉΓòÉΓòÉ 4.1. Well-known sites ΓòÉΓòÉΓòÉ
This list contains several well-known sites providing time service plus two
customizable entries. You are not limited to these sites. Any of the entries
may be changed to suit your local conditions.
The list of sites is abstracted from
http://www.eecis.udel.edu/~mills/ntp/clock2.html
The sites selected for inclusion here are all Stratum 2 (not Stratum 1) and are
listed as open access. If you would like to use one of these sites on a regular
basis, it would be gracious of you to download the clock.txt file for the
latest status and to observe also the access policy listed.
In most cases, your local network or your service provider will already have a
sufficiently accurate clock for regular use.
ΓòÉΓòÉΓòÉ 4.2. Hostname ΓòÉΓòÉΓòÉ
Enter the hostname here. Use the full name, such as tick.usno.navy.mil. If the
IP address is specified, then this field need not be used.
ΓòÉΓòÉΓòÉ 4.3. IP address ΓòÉΓòÉΓòÉ
If the IP address is known, enter it here. If there are any characters in this
field, the program will try to use this as an IP address.
If you don't know (or are unsure of) the IP address, just leave it blank and
the program will consult the nameserver. The IP address found will be stored
for the next use.
If the IP address for a server changes, simply delete the old IP address and
the program will consult the nameserver for the new IP address.
ΓòÉΓòÉΓòÉ 4.4. TCP radio button ΓòÉΓòÉΓòÉ
If the site provides the Time service via TCP, check this button. If you are
uncertain, just give it a try. If the service is not provided, the request will
time out in a few seconds.
ΓòÉΓòÉΓòÉ 4.5. UDP radio button ΓòÉΓòÉΓòÉ
If the site provides the Time service via UDP, check this button. If you are
uncertain, just give it a try. If the service is not provided, the request will
time out in a few seconds.
If both TCP and UDP are available, UDP may give slightly better results due to
the simpler operation.
ΓòÉΓòÉΓòÉ 4.6. Log ΓòÉΓòÉΓòÉ
The log is a record of the actions taken when processing a request for the
time. It also records any errors encountered.
The window will store about 2,000 characters of history. If more is needed, you
may need to log to a file.
ΓòÉΓòÉΓòÉ 4.7. Graph ΓòÉΓòÉΓòÉ
The graph records the last 20 results for this server. Each server is recorded
separately. The horizontal black line is the local notion of UTC. The green
band across the center of the graph indicates the span of plus and minus 1
second from local UTC.
The horizontal scale is the time from the first of the 20 samples to the last.
Samples taken closely together in time will appear close together on the graph.
The blue line indicates the amount of adjustment necessary to the local clock.
A value above the center line indicates that the local clock was ahead, while
below indicates the clock was behind.
If everything is working well, the blue line will stay within the green band
once the initial correction is made. If the blue line is consistantly above the
green band, then your clock is running fast. If it is consistently below the
green band, then it is running slow.
The red line above the center line is the latency of the time request. This is
one-half the total time for the request. It should normally be in the green
band unless the network is very busy or the time server was swapped out on the
server machine.
ΓòÉΓòÉΓòÉ 4.8. Delay ΓòÉΓòÉΓòÉ
When Auto-run is selected, the program will wait this number of seconds before
taking the sample. The minimum value is 5 seconds to allow time for the user to
cancel the Auto-run.
The Auto-run may be cancelled by deselecting the check-box.
ΓòÉΓòÉΓòÉ 4.9. Interval ΓòÉΓòÉΓòÉ
When continuous run is selected, the program will check the time at this
interval. The minimum value is 1 minute. There is no value in checking more
often than once per hour. In fact, there is often little to be gained by
checking more than once per day. This minimum also prevents a bombardment of
the server with requests.
ΓòÉΓòÉΓòÉ 4.10. Run now ΓòÉΓòÉΓòÉ
Pressing this button will check the time immediately.
ΓòÉΓòÉΓòÉ 4.11. Help ΓòÉΓòÉΓòÉ
Select the above menu item Help to use the Help Index, General Help or to get
basic information on how to use Help. Select for General Help.
ΓòÉΓòÉΓòÉ 4.12. Auto-run ΓòÉΓòÉΓòÉ
When this is selected, the program will automatically check the time after a
short delay. If continuous running or server enable are not selected, the
program will exit.
ΓòÉΓòÉΓòÉ 4.13. Continuous ΓòÉΓòÉΓòÉ
When this is selected, the program will check the time each interval.
ΓòÉΓòÉΓòÉ 4.14. Current Site Name ΓòÉΓòÉΓòÉ
The field contains an editable copy of the currently selected site name.
Changes to the name will show in the list the next time the program is loaded.
ΓòÉΓòÉΓòÉ 4.15. Retry Count ΓòÉΓòÉΓòÉ
Use this field to set the number of tries before giving up.
ΓòÉΓòÉΓòÉ 4.16. Logging ΓòÉΓòÉΓòÉ
Check this box if you wish the activity to be logged to a file. Each time the
program runs, information is added to the file.
Over time, the file can get quite large, so check the file size from time to
time if you are using this feature.
The logging of server start and stop are also controlled here.
ΓòÉΓòÉΓòÉ 4.17. Log file name ΓòÉΓòÉΓòÉ
This field sets the file name to be used for the log file. Each site can have a
different log file.
Server activity is logged to the current file.
ΓòÉΓòÉΓòÉ 4.18. Server enable ΓòÉΓòÉΓòÉ
Check this box to enable the UDP Time Server. This will enable the program to
provide time service to other systems.
The most common use will be to have a designated system get the time from an
outside source over the Internet (or other TCP/IP) network and then
redistribute the time to clients on the local area network.
Even in the absence of an outside reference, the systems on a local network can
be kept in close synchronization.
When enabled, the server is started as soon as the program is started and
remains running as long as the program does.
The selection of server enable prevents the program from automatically shutting
down after an Auto-Run. It is recommended that Auto-Run be enabled to sync the
server with the reference source on starting and that Continuous be enabled to
keep the server on time.
Deselecting this box will stop the server within a few seconds.
ΓòÉΓòÉΓòÉ 4.19. Log clients ΓòÉΓòÉΓòÉ
Check this box if you need to see which clients are requesting time service.
The IP address of the client is provided, along with the name of the client if
it is available.
Client logging can reduce the throughput and responsiveness of the server if
there are a large number of clients. It is recommended that this feature be
used for service and then disabled when not in active use.
ΓòÉΓòÉΓòÉ 4.20. Start minimized. ΓòÉΓòÉΓòÉ
Check this box if you would like the program to start in a minimized state.
You will probably check this box after you are comfortable with the reliability
and features of the program.
While minimized, the program continues to operate normally.
You can maximize the program by selecting it from the window list or clicking
on the icon in the Minimized Window Viewer or on the Desktop (depending on
where you minimize things.)
ΓòÉΓòÉΓòÉ 4.21. Persistant retry. ΓòÉΓòÉΓòÉ
When this box is checked, the program will persistently try to obtain a sample
until it is successful.
ΓòÉΓòÉΓòÉ 4.22. Maximum adjustment. ΓòÉΓòÉΓòÉ
This spin button selects the maximum adjustment permitted by any one sample. If
the sample suggests an adjustment larger than this value, the sample is
discarded. This will prevent the local clock from being set if the time server
suddenly becomes bad.
The value ANY allows any adjustment. This value is suggested for initial use to
set the clock to the correct time. After the initial setting, a value of 2-4
seconds should allow normal correction, but prevent erroneous settings.
ΓòÉΓòÉΓòÉ 5. Other Information ΓòÉΓòÉΓòÉ
About the Time Protocol
USNO time server
National Institute of Standards and Technology
UTC
ΓòÉΓòÉΓòÉ 5.1. Time Protocol ΓòÉΓòÉΓòÉ
Network Working Group
Request for Comments: 868
J. Postel - ISI
K. Harrenstien - SRI
May 1983
Time Protocol
This RFC specifies a standard for the ARPA Internet community. Hosts on the
ARPA Internet that choose to implement a Time Protocol are expected to adopt
and implement this standard.
This protocol provides a site-independent, machine readable date and time.
The Time service sends back to the originating source the time in seconds
since midnight on January first 1900.
One motivation arises from the fact that not all systems have a date/time
clock, and all are subject to occasional human or machine error. The use of
time-servers makes it possible to quickly confirm or correct a system's idea
of the time, by making a brief poll of several independent sites on the
network.
This protocol may be used either above the Transmission Control Protocol (TCP)
or above the User Datagram Protocol (UDP).
When used via TCP the time service works as follows:
S: Listen on port 37 (45 octal).
U: Connect to port 37.
S: Send the time as a 32 bit binary number.
U: Receive the time.
U: Close the connection.
S: Close the connection.
The server listens for a connection on port 37. When the connection is
established, the server returns a 32-bit time value and closes the connection.
If the server is unable to determine the time at its site, it should either
refuse the connection or close it without sending anything.
When used via UDP the time service works as follows:
S: Listen on port 37 (45 octal).
U: Send an empty datagram to port 37.
S: Receive the empty datagram.
S: Send a datagram containing the time as a 32 bit binary number.
U: Receive the time datagram.
The server listens for a datagram on port 37. When a datagram arrives, the
server returns a datagram containing the 32-bit time value. If the server is
unable to determine the time at its site, it should discard the arriving
datagram and make no reply.
The Time
The time is the number of seconds since 00:00 (midnight) 1 January 1900 UTC,
such that the time 1 is 12:00:01 am on 1 January 1900 UTC; this base will
serve until the year 2036.
For example:
the time 2,208,988,800 corresponds to 00:00 1 Jan 1970 UTC,
2,398,291,200 corresponds to 00:00 1 Jan 1976 UTC,
2,524,521,600 corresponds to 00:00 1 Jan 1980 UTC,
2,629,584,000 corresponds to 00:00 1 May 1983 UTC,
and -1,297,728,000 corresponds to 00:00 17 Nov 1858 UTC.
[As an astute reader has pointed out, this last example makes no sense at all.
- Norbert]
ΓòÉΓòÉΓòÉ 5.2. U.S. Naval Observatory ΓòÉΓòÉΓòÉ
The U.S. Naval Observatory has established two new network time servers for
reliable, accurate time over the Internet and Milnet WANS:
tick.usno.navy.mil 192.5.41.40
tock.usno.navy.mil 192.5.41.41
These HP9000/747i systems host Datum VME synchronized generators using IRIG-b
timecode from USNO Master Clock #2. The system clocks of these servers are
synchronized to within a few tens of microseconds of USNO Master Clock 2.
UTC(USNO) is provided over the network via a number of protocols. At present,
access is unrestricted.
ΓòÉΓòÉΓòÉ 5.3. National Institute of Standards and Technology ΓòÉΓòÉΓòÉ
NIST (National Institute of Standards and Technology) provides time service at
time.nist.gov (132.163.135.130).
The NIST Network Time Server is synchronized to the NIST cesium clock ensemble.
The server transmits time using three common internet protocols: tcp/ip,
udp/ip and NTP (Network Time Protocol).
ΓòÉΓòÉΓòÉ 5.4. Universal Time, Coordinated ΓòÉΓòÉΓòÉ
This is also known as GMT (Greenwich Mean Time) and Zulu (Zero) time. UTC is an
international standard for reporting time.
The zero meridian crosses Greenwich, England, home of the Royal Observatory.
ΓòÉΓòÉΓòÉ 6. Time Server ΓòÉΓòÉΓòÉ
A Time Server capability is included in the program. When enabled, the program
will provide time service to other systems.
The server also provides the ability to log the client requests, so that you
can check that your time distribution is working.
This facility allows the clients on a LAN to stay on a common time basis even
if isolated from a precise time source.
For testing the time server, run the ifconfig utility, setting up the loopback
interface.
Open an OS/2 command window. Run the command:
ifconfig lo 127.0.0.1
Now, start TIME868. Set one of the custom entries to an IP address of 127.0.0.1
and enable the server. Set the server to log clients. Press "Run now" and you
will see the client get the time from the server.
ΓòÉΓòÉΓòÉ 7. Setup ΓòÉΓòÉΓòÉ
Before starting to use the program, check to see that your TZ environment
variable is set correctly for your local time zone. If you change your
config.sys file, you will need to shutdown and re-boot for the change to be
effective.
Also check to see if your clock is somewhat close to the correct time. If your
clock is more than 4-5 minutes slow, the first correction may trick your dialer
into thinking that the idle time has exceeded its limit and disconnect you.
If this happens, just reconnect. The first correction has already been made and
the next try will cause no problems.
Initially set the Maximum adjustment field to ANY. Then after the clock has
been set to the correct time, change this field to 2-4 seconds.
Choose a time server site from those listed or identify one better for you.
The Auto-run feature was designed for those of us who are only connected to the
Internet once or twice a day. When this feature is selected, the program will
wait for the specified delay, then get the time and exit. (If you enable the
server feature, the program will not automatically exit.)
The initial delay should be set just long enough for the initial burst of
network traffic (the newsreader starting, etc) to settle down. If TIME868 is
competing with everything else for your PPP or SLIP link, the delays may be too
long for accurate time collection.
If you have a permanent connection to the Internet or to a time-server on a
LAN, you may wish to keep the program running and use the Continuous running
feature to check the time periodically. Once or twice a day should be all that
is necessary.
If you are running the server, you will want to keep the program continuously
running.
After you are comfortable with the operation, you may wish the program to start
minimized. The program will run fine while minimized, it just won't be taking
up screen space.
SLIP/PPP connections: Select Auto-run and Start Minimized. Then create a shadow
of TIME868 into your Startup Folder. Now, whenever you start your system,
TIME868 will automatically start running. Then, when you log into your Internet
Service Provider, TIME868 will sense the connection, set the clock, and exit.
Alternatively, if you use a startup script with your Internet access, you can
start TIME868 with the drive and directory name where the configuration and log
files should be kept. For example:
TIME868 e:\web
ΓòÉΓòÉΓòÉ 8. Registering the program ΓòÉΓòÉΓòÉ
TIME868 is free. But a picture postcard or an email note is appreciated. (I am
putting pushpins into a large world map on the wall and surrounding it with the
postcards.) If you are using TIME868 for multiple systems, please let me know
how many.
Norbert Dey
PO Box 103
Newberg OR 97132
USA
Bug reports and suggestions may be sent to dey@teleport.com
Thank you, Norbert Dey
DISCLAIMER
The author of this program accepts no responsibility for damages that are
caused by this program and make NO WARRANTY or representation, either express
or implied, with respect to this software. This software is provided "AS IS,"
and you assume the entire risk when you use it.
ΓòÉΓòÉΓòÉ 9. Changes by version ΓòÉΓòÉΓòÉ
Version 6, time868f.zip
Version 5, time868e.zip
Version 4, time868d.zip
Version 3, time868c.zip
Version 2, time868b.zip
ΓòÉΓòÉΓòÉ 9.1. Changes in version 2 (time868b.zip). ΓòÉΓòÉΓòÉ
Fixed minimize to desktop. (Minimize to viewer was working fine.)
Added program to window switch list.
Added more information about setting the TZ
Added retry option and counter.
The format of the configuration file has changed and been renamed to
TIME868.CFG.
Added log file option.
Added ability to edit name for custom sites (or the name of any site for that
matter.)
Added Time server capabilities.
ΓòÉΓòÉΓòÉ 9.2. Changes in version 3 (time868c.zip). ΓòÉΓòÉΓòÉ
Under some circumstances, the icon would be lost. Under other circumstances,
the icon would appear merged with part of the screen when minimized to the
desktop. These appear to be fixed.
Added a switch ... -h ... to send zero length packets as the request packet.
One implementation of the Time Protocol expects zero length.
Increased length of hostname variable to 63 bytes.
ΓòÉΓòÉΓòÉ 9.3. Changes in version 4 (time868d.zip). ΓòÉΓòÉΓòÉ
Added more information to this help file.
If TIME868 was started from the Startup Folder, it would often exit before a
SLIP/PPP connection was made. A Persisent retry option has been added so that a
valid TCP/IP connection must be made before the time sample is complete. This
means that you can now use the Startup Folder in a very natural way.
Select Auto-run, Persistent retry and Start Minimized.
Create a shadow of TIME868 into your Startup Folder.
Now, whenever you start your system, TIME868 will automatically start running.
Then, when you log into your Internet Service Provider, TIME868 will sense the
connection, set the clock, and exit.
ΓòÉΓòÉΓòÉ 9.4. Changes in version 5 (time868e.zip). ΓòÉΓòÉΓòÉ
Fixed the server. I was in too much of a hurry. I know better.
ΓòÉΓòÉΓòÉ 9.5. Changes in version 6 (time868f.zip). ΓòÉΓòÉΓòÉ
Another correction for the length of the hostname (greater than 32 bytes).
Rewrote the time setting routine to allow large variances without exceeding the
length of a signed long (2^31).
Added a direct control on the maximum amount of variance allowed. Note that the
restriction does not apply to the first sample upon changing from Summer time
to Winter time or vice versa.
If you start TIM868 from a script, you can now provide the drive and directory
where the configuration (TIME868.CFG) and log files are kept. For example:
TIME868 d:\time
Fixed a bug where the program would still persist in retrying even though the
Persistent Retry feature was not enabled. This occurred when the dialup
connection was not available.
Improvements to the online help.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
A symbol that shows that a choice is currently active.