Table of Contents
ARexx Interface
TimeKeeper provides an ARexx port with a diverse set of commands.
The ARexx address is TIMEKEEPER.1.
| Command | Description |
|---|---|
| ID | Get application identifier |
| VERSION | Get application version number |
| HELP | Get a list of ARexx commands and a short description |
| STATUS | Get current synchronization status |
| TIMEZONE | Get current time zone |
| LASTSYNC | Get time of last synchronization operation |
| LASTADJ | Get time of last clock adjustment |
| GET | Get a runtime configuration value |
| SET | Set a runtime configuration value |
| SHOW | Show settings window |
| HIDE | Hide settings window |
| START | Start the time synchronization process |
| STOP | Stop the time synchronization process |
| SHUTDOWN | Shutdown TimeKeeper |
| LOGTRANS | Emit time zone transition map to log |
Parameters
STATUS accepts NUMBER as parameter. Result is instead formatted
as binary value.
TIMEZONE accepts a code as parameter. The code determines how
the result is formatted.
| Code | Description |
|---|---|
| 1 | Seconds ahead of UTC (+[s]) |
| 2 | Minutes ahead of UTC (+[m]) |
| 3 | TZ style long format (UTC-[hh]:[mm]) |
| 4 | TZ style short format (-[hh]:[mm]) |
| 5 | ISO 8601 style (+[hh][mm]) |
| 6 | ISO 8601 style (+[hh]:[mm]) |
| 7 | ISO 8601 short style (+[h]) |
| 8 | Common identifier (GMT+[hh]:[mm]) |
| 9 | Common identifier, offset with name in parens |
| 10 | Common identifier, name with offset in parens |
| 11 | Standard time zone |
| 12 | DST time zone |
NOW, LASTSYNC and LASTADJ accepts DOS, ASCII, DATE, TIME, RFC850,
RFC1123, RFC2822, RFC3339 or ISO8601 as first parameter. DOS is
assumed if parameter is not specified.
LOCAL and UTC are accepted as second parameter. LOCAL is assumed
if second parameter is not specified. RFC850 and RFC1123 are always
GMT.
| Style | Description |
|---|---|
DOS |
AmigaDOS style |
ASCII |
C ASCII style |
DATE |
ARexx formatted as sorted date |
TIME |
Time in seconds since midnight |
GET accepts SERVER, PORT, THRESHOLD, INTERVAL, CX_PRIORITY,
CX_POPKEY, CX_POPUP, READONLY, EXPERT, TIMEOUT, ACTIVE, NOLOG,
TZD, TZ, TZNAME, TZVALUE and TZDST as parameter. CX_POPUP,
READONLY, EXPERT, ACTIVE and NOLOG accepts NUMBER as parameter.
SET accepts the same parameters as GET, except CX_POPKEY, and an
addition value parameter.
ID, VERSION, HELP, SHOW, HIDE, START, STOP, SHUTDOWN and LOGTRANS
does not accept parameters.
Error Handling
The local variables TIMEKEEPER.ERRORCODE and TIMEKEEPER.ERRORTEXT
are set on each call too ARexx.
There is a number of possible error codes.
| Code | Description |
|---|---|
| 0 | No errors |
| 10 | Unknown ARexx command |
| 11 | Unknown parameter |
| 12 | Parameter is missing |
| 13 | Invalid parameter value |
| 18 | Clock has not been adjusted |
| 19 | No responses from NTP server |
| 20 | Synchronization is already active |
| 21 | Synchronization is already deactivated |
Examples
Stop the the time synchronization process with:
Address TIMEKEEPER.1 stop
Start the the time synchronization process with:
Address TIMEKEEPER.1 start
Show the settings window with:
Address TIMEKEEPER.1 show
The arexx folder contains a set of sample scripts.