IDK COMPUTER SYSTEMS
Hardware/Firmware/Software Integrated Solutions
Patrick J. Gleason, Staff Engineer
Buy this web site... only $499.95!
| Home | Products | Services | Free Stuff | Shopping Cart | Contact Us |
Author: Patrick J. Gleason
Date: 9-Feb-2007
Project: Bulletron Internet Operating System 12.0
Operating System: OS/2 Warp 4.0 and later, eComStation
Compiler: IBM VisualAge C++ 3.0
Phone: (315) 475-5598
Email: ora68@nehemiah.idkcomp.com
This program synchronizes the date and time of the local PC with the atomic clock provided by the United States' National Institute of Standards and Technology (NIST). It is intended to supercede and replace a program named "NISTIME.EXE" for eComStation and IBM OS/2, which no longer works because it was hard-coded many years ago with an IP address for the time server that is no longer valid.
The protocol used by this program is named "DAYTIME", which uses well-known TCP/IP port 13. A full explanation and specification for the DAYTIME protocol can be found at "http://tf.nist.gov/service/its.htm", and in RFC 867. The home page for the NIST web site is "http://www.nist.gov".
This program connects to a time standard server using TCP. The server sends back a 51 character message using the same format as ACTS (Automated Computer Time Service) for direct modem dial-in. The format of this message is:
JJJJJ YR-MO-DA HH:MM:SS TT L H msADV UTC(NIST) OTM
where:
A plain ASCII text file, named "DAYTIME.INI" controls the operation of this program. This configuration file defines three parameters, all of which are optional. Blank lines and lines beginning with a semicolon in the configurattion file are ignored as comments. Each parameter line consists of a label, followed by a colon, then a space, then a value. The parameters are:
| Label | Value |
|---|---|
| Server: | specifies the Internet of the time standard server. If this is not specified, then the default is "time.nist.gov". A current list of servers is published by NIST at "http://tf.nist.gov/service/time-servers.html". |
| period: | specifies the number of hours between synchronizations. If this is not specified, then the program synchronizes the date and time at 24 hour intervals. If you want to just do one synchronization, then exit, perhaps as part of a "CHRON" batch job, then specify 0 for the period. |
| verbose: |
specifies the amount of information recorded in the progam execution log: 0 = log date and time updates and errors only 1 = also include all protocol details 2 = also include DEBUG style (hexadecimal and ASCII) dump of all data sent and received |
You can execute this program from any OS/2 or eCS command line prompt by entering:
DAYTIME
There are no command line parameters.
You can call it from "STARTUP.CMD", put an object for it in your System Startup folder, or whatever.
As the program executes, it displays error messages and progress messages on the screen, and writes them to a file named "DAYTIME.LOG". Various levels of detail in the logging can be enabled to help you debug your setup.