Shell Commands/SetClockNTP

From MorphOS Library

Revision as of 13:52, 29 June 2026 by JPV (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

< Shell Commands

SetClockNTP - Syncs the realtime clock from the internet using Network Time Protocol

UTCDIFF=DIFF/N, TIMEOUT/N, SERVER/K/M, SAVE/S, NODST/S

DIFF    - Is a simple minute time offset. The base is GMT.
TIMEOUT - Is a simple timeout in seconds to prevent the command from
          locking up. Default is 60 seconds.
SERVER  - Overrides the internal ntp server list. Servers are specified
          name:port. If no port is specified, then the default port 123 will
          be used. There is no limit on the number of servers specified.
SAVE    - This option will cause that the battery backuped real time clock
          will be set, too.
NODST   - If daylight saving time mode is unwanted or wrong for your location,
          add this argument and use DIFF to specify the correct offset if
          needed.

Note: This tool can easily be enabled to run every time the network goes online by editing S:user-network-startup and removing the ; in the beginning of the line that reads ;SetClockNTP SAVE