Yokemate of Keyboards
Posts: 2096 from 2003/2/24
From: po-RNO
Quote:
Templario wrote:
Thank you for your help, I was finding a shell command to set the time date and hour because these commands are to use the clock with battery, and my mac hasn't it.
My idea is make a little tool or ARexx command to save to a txt file with the date and hour and read it to set when I not use Internet.
Oops, sorry. Those my previous suggestions aren't good for that indeed.
But the Date command would be better, and some shell scripts would probably be enough, no need to go to heavier scripting/programming
For example, to save the date to a file:
Date > ENVARC:mytimehack
and then to set the date from the file:
Date >NIL: ? < ENVARC:mytimehack
...or something like that.
You could, for example, to make a shell script that you use to shutdown/reboot the machine always:
Code:
Date > ENVARC:mytimehack
RequestChoice >ENV:rcnum "SHUTDOWN" "Press enter to shutdown or wait 10s to cancel." "Shutdown" "Reboot" "Cancel" TYPE=1 TIMEOUT=10
Wait 2
If 1 EQ $rcnum
Shutdown
Quit
EndIf
If 2 EQ $rcnum
Reboot
Quit
EndIf
And then have that "Date >NIL: ? < ENVARC:mytimehack" in s:user-startup...
But of course the clock will be wrong when your machine is off for a longer time and lose time in reboots, how did you think to handle that?