Amiga World Official AmigaDOS 2 Companion - eBook-ENG

Page 255

Delving into AmigaDOS

2*0 /

The DATE argument takes the form DD-MMM-YY, where DD is the day of the month (leading zeros are not required), MMM is the first three letters in the month name, and YY is the last two digits in the year. Note that you can't set the clock to a date before January 1, 1978. Years from 00 to 77 are consid ered 2000 to 2077. Commodore is ready for the 21st century. The DAY argument lets you substitute a day of the week for the DATE argu ment. When you use a day of the week, the command substitutes the date the day will fall upon in the next week. Of course, it makes this substitution based upon the current setting of the clock; if the clock is incorrect, the date you get entering a day of the week will also be incorrect.

The TIME argument takes the form HH:MM:SS, where HH is the hour of the day (0-23), MM is the minute (0-59), and SS is the second (0-59). The seconds part of the time is optional. Thus, to set the time and date to 6:55 PM, July 5, 1991, you enter:

DATE 18:55 5-jul-91 Once you have the system clock set, you use it — and the SetClock command — to set the battery-backed clock.

SetClock has the following template: LOAD/S,SAVE/S,RESET/S

The SAVE/S argument tells SetClock to set the battery-backed clock with the time and date in the system clock. If you've previously set the system clock with the Date command, this argument will ensure that the battery-backed clock has the correct time and date. Having set the battery-backed clock once with SETCLOCK SAVE

you need never set it again unless you move to another time zone or wish to keep up with the daylight-savings changes. You still need to set the system clock, however, every time you turn on your system. Instead of using Date to enter the time and date manually, you use the LOADIS option of SetClock.

The LOAD/S option is the opposite of SAVE/S. It sets the system clock from the battery-backed clock. If you do this once every time you turn on your sys tem, you'll always have the correct time and date in the system clock, and thus always have the correct time and date for the Clock program and for AmigaDOS time/date stamps. When you examine the standard AmigaDOS Startup-sequence in Chapter 10, you'll see that the first command is: SETCLOCK LOAD


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.