PH Synctime

Probe House Software
by Wong CK
© Copyright 2012

Version 1.0

What is this?

PH SyncTime is a simple program that checks and syncs the computer clock with a Network Time Protocol (NTP) server. It uses the simple version of NTP, simply called Simple Network Time Protocol (SNTP), duh! This SNTP does not take into consideration the time interval during the communication with the NTP server. This means it is not as accurate as the full-blown NTP sync application, the trade off - is just being plain simple.

The reason for making this application is because the available NTP client on the Atari seems to sync the hardware clock to UTC time. This is the normal case where big computer systems like UNIX and Windows runs on UTC time. For the Atari, this is fine if your system is on UTC or uses UTC time even for TOS. But on my system it is set to local mode, meaning the hardware clock is showing the time like it on my wall clock, not UTC time. This small app understands local mode (hopefully) and will sync the hardware clock accordingly.

Requirements

This runs on Mint with MintNet and requires internet connection. Your system must have time zone setup correctly, using the zic command (time zone compiler). Also the tzinit command is ran to notify your system of the hardware clock mode. This program uses MINT threads, so a newer version of MINT will be better, like v1.18.

Daylight saving time

The daylight saving time (DST) dates changes every year and so maintaining it will be horrendous. MINT time zone information will make an attempt at calculating the DST of a country. If this calculation misses by a few days or is wrong, please inform the app if your country is currently in DST, by switching on the DST field.

The App layout

  • Current time displays the time using your computer.
  • Hardware (HW) clock mode displays the meaning of the computer clock. If it is in local time, it means the time in the computer clock is storing the local time. If it us UTC, it means the time in the computer clock is storing the current UTC time.
  • Timezone is as set in your system. The parenthesis shows the offset from UTC/GMT
  • NTP Server is the NTP server this app will talk to. You can edit and change to another nearer to you.
  • Hello is the message area.
  • DST is a switch to toggle DST in your country.
  • SYNC is a switch to toggle between update and check mode. Selecting it will UPDATE the system clock. Unselecting it will put the app to CHECK mode and will not update the system clock
  • UPDATE button perform the task to sync and update the system clock. This button can be CHECK if the toggle SYNC is unselected.
  • CLOSE button Exits the app.

Usage

  1. Make sure Mint is running and you have Internet connectivity. Your time zone and tzinit is properly executed.
  2. Check that the NTP server of your choice is reachable. The default is pool.ntp.org, which is a pool of NTP servers serving clients for free. You may change it to one of the NTP servers in your country. The project website is here.
  3. If your country is currently in DST, toggle ON the DST tick box.
  4. If you want to UPDATE the system clock, toggle ON the SYNC tick box.
  5. Click on the UPDATE/CHECK button to begin the process. You see will the progress of the process in the message area.
Finally you will see the time from the NTP server, which is in UTC time, and the difference between it and your system time with time zone information accounted for.

That's it.

Config file

The config file is called synctime.cfg located at the same folder of the app. It is created by the app itself. The 1st line is the DST settings and the 2nd line is the last used NTP server name. If you need to set back to the default NTP server, just delete this file away. You should be able to edit this file with any editor, just make sure it is in 2 lines.

Limitations


Questions, comments, or error reports? Please leave a post at Atari-Forum.com
Visit my web site at https://sites.google.com/site/probehouse/