AmigaOS 4.0 - About OS4 - Commands
DATE with no argument displays the currently set system date and time, including the day of the week. Time is displayed
using a 24-hour clock.
DATE <date> sets just the date. The date can be specified either in the current default locale format or in the AmigaDOS format DD-MMM-YY (day-month-year). If the AmigaDOS format is used, the hyphens between the arguments are required. A leading zero in the date is not necessary. The first 3 letters of the month (in the current locale language) must be used, as well as the last two digits of the year.
The date can also be reset by specifying a day name, thus setting the date forward to that day of the week. You can also use tomorrow or yesterday as the <day> argument.
DATE <time> sets the time. The time can be specified either in the current default locale format or in the AmigaDOS format HH:MM:SS (hours:minutes:seconds). Seconds are optional.
The SERVER option is used to retrieve the current date and time from a remote server over a TCP/IP connection using the Network Time Protocol (NTP). A list of NTP time servers and some good background information can be found at http://ntp.isc.org/bin/view/Servers/WebHome.
By using PORT you can specify a port number different to the default 123.
The OFFSET argument allows to set the offset in minutes of your location with respect to Greenwich Mean Time (GMT). If OFFSET is not specified, the locale offset will be used.
The LFORMAT option modifies the output of DATE using one or more substitution operators. The available substitution operators are:
%A - weekday name
%b - abbreviated month name
%B - month name
%c - same as "%a %b %d %H:%M:%S %Y"
%d - day number with leading 0s
%D - same as "%m/%d/%y"
%e - day number with leading spaces
%h - abbreviated month name
%H - hour using 24-hour style with leading 0s
%I - hour using 12-hour style with leading 0s
%j - julian date
%m - month number with leading 0s
%M - the number of minutes with leading 0s
%n - insert a linefeed
%p - AM or PM strings
%q - hour using 24-hour style
%Q - hour using 12-hour style
%r - same as "%I:%M:%S %p"
%R - same as "%H:%M"
%S - number of seconds with leadings 0s
%t - insert a tab character
%T - same as "%H:%M:%S"
%U - week number, taking Sunday as first day of week
%w - weekday number
%W - week number, taking Monday as first day of week
%x - same as "%m/%d/%y"
%X - same as "%H:%M:%S"
%y - year using two digits with leading 0s
%Y - year using four digits with leading 0s
If your Amiga does not have a battery backed-up hardware clock and you do not set the date, the system, upon booting, will set the date to the date of the most recently created file on the boot disk.
NOTE: Adjustments made with DATE only change the software clock. They will not survive past power-down. To set the battery backed-up hardware clock from the Shell, you must set the date and use SETCLOCK SAVE.
See Also: SETCLOCK
Disclaimer: Amiga Auckland have prepared the above information for the use of its members based on our experiences and as such is subject to revision at any time. Amiga Auckland cannot guarantee any of the information and cannot be held accountable for any issues that may result from using it.