Short: Miami script to save the ntp time - 1.3 Author: geohei@ibm.net (Georges Heinesch) Uploader: geohei ibm net (Georges Heinesch) Type: util/rexx Version: 1.3 (04 Feb 1998) Requires: Miami 1.1 or better Architecture: m68k-amigaos $VER: savetime.miami 1.3 (02 Feb 1998) savetime.miami for Miami 1.1 or better © Georges Heinesch , Luxembourg http://www.geocities.com/yosemite/2480 PGP 2.6.3i public key available on request and on public servers This script should be used when requesting the correct time from an ntp server (time server). If an ntp server is queried, it updates the system time. This script saves this updated time to the battery clock of the Amiga and optionally creates a logfile to keep track of the correction applied to the system time. To get an address from an adequate ntp server, have a look at 'http://www.cis.udel.edu/~mills/ntp/servers.html'. Choose one and insert the address into the relevant string gadget (bottom of 'TCP/IP' page). Don't forget to activate the 'Get Time' switch. Then enter the path/name of this script (e.g. ARexx/savetime.miami) into the 'Online' string gadget ('Events' page). This starts the script as soon as the ntp server transmitted the time information. Optionally, the corrections applied to the current system time can be logged to a file. If this is desired, set the 'log' variable to 'true' (default is 'true') and enter the path/name of the log file (default is 'Miami_Time.log'). Example of a log file: Date old time ntp time error --------- -------- -------- --------- 02-Feb-97 19:05:34 19:05:35 -00:00:01 02-Feb-97 19:08:54 19:08:55 00:00:00 02-Feb-97 19:16:06 19:16:06 -00:00:02 02-Feb-97 19:19:29 19:19:29 +00:00:03 02-Feb-97 19:20:49 19:20:49 -00:00:02 The variable 'secdelta' takes system speed into account and has to be set accordingly. Fast systems use 1 (68060), slow system 2 or 3 (68020). To find the correct value, run the script a couple of times with the log option enabled and analyse the log file. The average of the time errors is the value to enter here (in seconds). ENVARC:TZ must be set up correctly as well. Have a look at 'http://www.ifh. de/computing/manuals/infohtml/glibc/library_318.html' for details. For Luxembourg, I have "CET-1". For some reason, "CET-1CEST-2" doesn't work properly on the Amiga. Therefore, I change TZ manually to "CET-2" for daylight saving. Apparently, TZ only accepts 3 digits as national time zone code. In fact, the 3 digits aren't used, which means that "xxx-1" or "xxx-2" would work as well. The file "tzdata1997a.tar.gz" gives even more detailed information. It can be found at "ftp://elsie.nci.nih.gov/pub". Here the most important zones. africa -1:00 AAT Atlantic Africa Time (no longer used) 0:00 WAT West Africa Time 1:00 CAT Central Africa Time 2:00 SAT South Africa Time 3:00 EAT East Africa Time asia 2:00 EET EEST Eastern European Time 2:00 IST IDT Israel 3:00 AST ADT Arabia 4:00 GST Gulf 5:30 IST India 7:00 ICT Indochina 8:00 CST China 9:00 JST Japan 9:00 KST Korea 9:30 CST (Australian) Central Standard Time australasia 8:00 WST WST Western Australia 9:00 JST Japan 9:30 CST CST Central Australia 10:00 EST EST Eastern Australia 10:00 GST Guam 10:30 LHST LHST Lord Howe 12:00 NZST NZDT New Zealand 12:45 CHAST CHADT Chatham -11:00 SST Samoa -10:00 HST Hawaii europe -4:00 AST Atlantic -3:00 WGT WGST Western Greenland -1:00 EGT EGST Eastern Greenland 0:00 GMT BST Greenwich, British Summer 0:00 GMT IST Greenwich, Irish Summer 0:00 WET WEST Western Europe 1:00 CET CEST Central Europe 2:00 EET EEST Eastern Europe 3:00 MSK MSD Moscow northamerica -4:00 AST ADT Atlantic -5:00 EST EDT Eastern Standard Time -6:00 CST CDT Central Standard Time -7:00 MST MDT Mountain Stantard Time -8:00 PST PDT Pacific Standard Time -9:00 YST Yukon Standard Time -10:00 HST Hawaii Standard Time southamerica -2:00 FST FDT Fernando de Noronha -3:00 EST EDT Eastern Brazil -4:00 WST WDT Western Brazil -4:00 AST ADT Atlantic -5:00 AST ADT Acre $HISTORY: 18 Feb 1997 : 1.0 : First release. 04 Apr 1997 : 1.1 : Serveral bug fixes 04 Jan 1998 : 1.2 : bug fix 02 Feb 1998 : 1.3 : bug fix