Network
Time Service (NeTS) > Download
<< back to Network Time
Service (NeTS)
Code for Windows User

This is to synchronize your PC to Singapore Standard
Time using tcp/ip "Daytime Protocol" or "
Network Time Protocol"(NTP).
<< back to Network Time
Service (NeTS)
Guide for Windows
User

| Installation:
NeTS software |
| Step 1: |
Download file sst.zip
from the website to the directory you prefer in
your
computer. |
| Step 2: |
Unzip this file sst.zip
by using WinZip software in your
Windows system.
sst.zip comprises two files -- sst.exe and cw3230.dll.
You should put them in
the same directory. |
| Step 3: |
Creat a shortcut for sst.exe.
This can be done by:
| 1) |
right click your mouse |
| 2) |
choose "shortcut" under option
"new" |
| 3) |
select the path of sst.exe using "browser" |
| 4) |
give a name to the shortcut and then click
"finish" |
|
| Usage:
NeTS software |
| Step 1: |
Double-click on sst.exe icon to
start the program. (Skip this if you are
already running the program.) A dialogue window
will come out.
|
| Step 2: |
sst.exe has been
set to automatically do the time request every
time when it is ran. Therefore, after clicking
the icon, a message box will soon be shown telling
you the time information transferred from our
time server. For either of the time formats, your
machine time will be synchronized to SST if answering
and clicking "ok".
The time message has two different formats as shown
below:
| 1) |
If the time request is done in "Network
Time Protocol" (NTP) format, the returned
time message is like this:
Server
1 response at 2001- 08- 08 05:52:31
UTC(SG)
Local clock - SST = - 0.273 seconds
Approx. network delay = 15 microseconds
Adjust clock by this amount?
[ok] [cancel] |
|
| 2) |
If the time request is done in "daytime
protocol" format, the returned time
message is as follows:
MJD
yy-mm-dd hh:mm:ss
DST
LS H
Advs.
52129 01-08-08 05:54:11
00 0
0 787.1
UTC(SG) *
local clock - SST = 0.003 seconds
Adjust clock by this amount?
[ok] [cancel] |
For this time format, the meaning of each
entry shown in blue are given below:
| MJD |
MJD is a modified
version of Julian Date (JD) obtained
by subtracting 2,400,000.5
days from JD. JD is a dating method
startings from 0 at UTC 12 noon 1 Jan
4713 BC. |
| DST |
DST is the Daylight
Saving Time flag. As no daylight saving
time is used in
Singapore, DST always gives 0. |
| LS |
LS indicates the
information of leap second. LS is 0
when no leap second is
imminent. If LS is 1 then a leap second
is scheduled to be added after
23:59:59 UTC on the last day of the
current month. |
| H |
H parameter gives
an estimate of the health of the time
server. A value of 0
indicates fully healthy. Positive integers
indicate increasingly poor health. Both
the magnitude of the possible time errors
and the uncertainty increase as H
increases from 0. |
| Adv. |
Adv. parameter gives
the time advance in milliseconds. The
entire time code
packet leaves the server early by this
amount to compensate approximately for
the delay in the travel time through
the Internet. |
| * |
* This is a on time
marker |
|
|
| Step 3: |
More time request can be made by choosing
different time format or
different time server. The headings listed in the
dialogue box give many
options on that. The procedures are:
| 1) |
Select a server and time request format
from entry "select server" under
heading "File" |
| 2) |
Click "Now" under heading "Query
server", a same message box as the one
in step 2 is coming out |
| 3) |
Answer ok (or cancel) to do (or not do)
your system time adjustment |
|
| Step 4: |
Once the computer time has been adjusted
to SST, you can set sst.exe to
do periodic time request. The procedures are:
| 1) |
Select a server and time request format
from entry "select server" under
heading "File" |
| 2) |
Key in the hours between queries in the
entry "periodically" under heading
"Query server". (The option
"run in background" is to make sst.exe
dialogue
window invisible and working in the background.)
The time differences derived from every time
request between your machine time and SST
can be saved to a file by enabling "save
Diff. and Err" under "File". |
|
| Step 5: |
Click "File" and select "Exit"
to close sst.exe. Or you can make periodic
request like step 4 and then minimize the dialogue
window. |
<< back to Network
Time Service (NeTS)
Codes for UNIX User

These three files are used for time request via "Time
Protocol" tcp/ip port 37.
These three files are used for time request via "Daytime
Protocol" tcp/ip port 13.
<< back to Network
Time Service (NeTS)
Guide for UNIX User

If you are workstation user with "standard"
UNIX supporting tcp/ip communication over internet,
then you can build a version for your machine using
tcp_port37/( or tcp_port13.c
) sw.c and makefile.
The program will also work on many machines that are
based on System V but have the ability to emulate BSD
Sockets. tcp_port37.c uses the tcp/ip
"daytime" protocol and tcp_port13.c
adopts the "time" protocol. Both protocols
assume that the user is connected to the internet.
Time protocol is the simplest one to use. The server
listens on port 37 and responds to a request by sending
an unformatted 32-bit binary code, which is the UTC
seconds since 1 January 1900. Our client program will
convert the seconds to SST.
In daytime protocol, the serevr listens on port 13
and responds to a request in either tcp/ip or udp/ip
formats by sending the time and date as a line of text.
This line of text message includes the following contents:
Modified Julian Day (MJD) | date in
terms of year, month and day | time in terms of hour,
minute and second | DST flag | LS
flag | H parameter | advance
parameter.
| Text
message |
| MJD |
MJD is a modified
version of Julian Date(JD) obtained by subtracting
2,400,000.5 days from JD. JD is a dating method
starings from 0 at UTC 12 noon 1 Jan 4713 BC. |
| DST |
DST is the Daylight
Saving Time flag. As no daylight saving time is
used in Singapore, DST always gives 0. |
| LS |
LS indicates the information
of leap second. LS is 0 when no leap second is imminent.
If LS is 1 then a leap second is scheduled to be
added after 23:59:59 UTC on the last day of the
current month (That second will be called 23:59:60,
and the next second will be 00:00:00 of the next
day). If LS is 2 then a leap second is scheduled
to be dropped at the end of the current month (The
second following 23:59:58 will be 00:00:00 of the
next day). |
| H |
H parameter gives
an estimate of the health of the time server. A
value of 0 indicates fully healthy. Positive integers
indicate increasingly poor health. Both the magnitude
of the possible time errors and the uncertainty
increase as H increases from 0. Users who need the
time with an uncertainty of less than 1 second should
not use the message if H is non-zero and those who
need the time with an uncertainty of 3 s or less
should not use the message if H is greater than
+1. |
| advance |
advance parameter
gives the time advance in milliseconds. The entire
time code packet leaves the server early by this
amount to compensate approximately for the delay
in the travel time through the internet. |
<< back to Network
Time Service (NeTS)
Important
Notice!
The NeTS may affect operations that are dependent
on time information embedded in computers. Users
should decide the suitability of using this programme
and, if necessary, seek expert advice.
The National Metrology Centre shall not be liable to any user
for any loss or damage suffered by the user arising
from disruption to the user’s computer or
the running of any programme installed therein
as a result of using the NeTS. In the event that
National Metrology Centre is found liable by the operation
of law, National Metrology Centre’s maximum liability to the
user for any claim shall be limited to S$1.00.
The NeTS may be disrupted or changed without
advance notification. |
|