NTP-clock
Download:
ntpclock.zip
Analog clock with NTP-support. It will use ip-api.com geolocation to
find your timezone, then get the current time from ntp.org. Finally
it will set the clock to the correct time for your timezone. DST is
also handled.
There is no way to specify manually which timezone to use. However,
if you're not comfortable with geolocation then you can disable this
in settings. This also means that it won't fetch the current time
from ntp.org. You can instead use the included .ttp to fetch the
current time, as it has an option to disable geolocation.
Requirements
- Working STiK/STiNG/GlueSTiK internet connection.
- A multitasking AES is not required, but the application makes
little sense without.
- Not a requirement, but it's made for larger screen so it
probably doesn't make much sense to use it on standard graphics
hardware.
Usage
Run
ntpclock.prg
. A clock will be displayed in a window in
the center of your screen. Click somewhere on the clock to display a
popup-menu with the following options:
- Sync now: Will get your timezone and current time and set your
computer's clock accordingly. Only available when NTP is enabled in
settings.
- Iconify: Iconify the clock window. This only works with XaAES and
MagiC, as other AES'es does not support this iconify mode.
- Always on top: The clock window will "float" ontop of all other
windows, even when it doesn't have input focus. XaAES only.
- Settings: Opens the settings dialog, see below.
- Quit: Quits and saves configuration and position (if changed).
Settings dialog
- Automatic date & time: Enables geolocation and NTP. Your timezone
and correct time is fetched when ntp-clock is started, and then every
hour. The GEMDOS clock will be set.
- RTC: Will also update your computer's RTC (if present) when
ntpclock exits.
- Seconds: Enable display of seconds. Not recommended.
- Colours: Here you can set the colours of the hour, minute and
second arms, as well as the hour marks, timezone/date and clock face.
When you pick a colour you can also choose "Disable", which will
disable the drawing of this particular element. "Shadow width"
sets the shadow offset in pixels.
Settings are saved automatically when the program exits.
Window location and size
The clock window does not have any widgets, so moving and resizing is
not done as for "normal" windows.
- Move: Click and hold somewhere on the clock, then drag it to it's
new position.
- Resize: There's two ways to do this. With XaAES you can grab one of
it's window corners or edges and drag to resize. With any other AES
you grab the lower right corner of the clock and drag to resize.
Please note that there's limits to the clock's size and width/height
ratio.
Position and size is automatically saved when ntp-clock exits.
Bugs/limitations
- If STiK/STiNG/GlueSTiK is installed but no internet connection set
up, ntp-clock will halt for quite some time when attempting to reach
the geolocation/ntp servers.
ntpclock.ttp
This is a small commandline NTP-client for TOS/MiNT/MagiC with a
working STiK/STiNG/GlueSTiK internet connection. Run it from the
commandline, mint.cnf or autofolder to automatically set your clock
to the correct time. Needless so say you must run it
after the
network has been set up.
Usage
ntpclient.ttp -tz <offset> -q
All parameters are optional.
- -tz <offset>. offset is an offset from
UTC in the format -00:00 or +00:00, indicating the number of
hours and minutes before/after UTC. Please note that DST is not
supported when timezone is set manually, so you will have to
manually adjust the timezone offset for DST.
- -q. Quiet-mode, ntpclock doesn't output any text.
If
-tz isn't specified ntpclock will use geolocation to
determine your current timezone, DST included.
Feb. 2025, joska@online.no