home *** CD-ROM | disk | FTP | other *** search
/ Aminet 10 / aminetcdnumber101996.iso / Aminet / util / boot / ClockCheck1_14.lha / ClockCheck / ClockCheck.doc < prev    next >
Text File  |  1995-11-05  |  8KB  |  185 lines

  1. ---------------------------------------------------------------------------
  2.                            ClockCheck 1.14                        05-Nov-95
  3. ---------------------------------------------------------------------------
  4.  
  5. Introduction
  6. ~~~~~~~~~~~~
  7. Did it ever happen to you that the battery-backed-up clock forgot the
  8. time, and you did a lot of work with the clock set to a strange date?
  9.  
  10. If it did happen, then you probably had a lot of trouble finding out
  11. which files were newer than which other ones?
  12.  
  13. That was exactly what happened to me, so I thought about doing a
  14. program that could check if the date is right or not; this is that
  15. program.
  16.  
  17. Requires OS 2.04 (V37).
  18.  
  19. Disclaimer
  20. ~~~~~~~~~~
  21. THIS SOFTWARE AND INFORMATION IS PROVIDED "AS IS". NO REPRESENTATIONS OR
  22. WARRANTIES ARE MADE WITH RESPECT TO THE ACCURACY, RELIABILITY, PERFORMANCE,
  23. CURRENTNESS, OR OPERATION OF THIS SOFTWARE AND INFORMATION, AND ALL USE IS
  24. AT YOUR OWN RISK. THE AUTHOR DOES NOT ASSUME ANY RESPONSIBILITY OR LIABILITY
  25. WHATSOEVER WITH RESPECT TO YOUR USE OF THIS SOFTWARE AND INFORMATION.
  26.  
  27. Copyright
  28. ~~~~~~~~~
  29. This program is FREEWARE. It may be freely distributed as long as all files
  30. in it remain unchanged and are included in the distribution. Also no more
  31. than a nominal copy fee may be charged for the distribution. This program
  32. cannot be used for commercial purposes without written permission from the
  33. author.
  34.  
  35. What's this program used for?
  36. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  37. When I did this program, it was meant for users that have a battery-
  38. backed-up clock, but I now have realized that in can also be used by those
  39. that haven't got one. If so, you will have to set the clock after every
  40. power-up. Enough about that, I will now go on with a description of the
  41. original purpose of the program.
  42.  
  43. When you eg. start a demo or an old game or something that crashes the
  44. computer, it sometimes happens that the clock has been set to some kind
  45. of maniac's time and/or date. Sometimes it can't be read at all.
  46.  
  47. Normally, at this point, you won't notice that the clock isn't right, so
  48. you'll just go on saving files, copying files etc. When you realize that
  49. the clock is wrong, you set the clock, BUT.., all files that you have
  50. changed will have the wrong date. This might not look that important, but
  51. sometimes when you want to know which file is newer than another, you
  52. will have big trouble finding out the real dates.
  53.  
  54. BUT... :)>-=>
  55.  
  56. If you use ClockCheck, this will happen:
  57.  
  58. When you boot the computer, clockcheck will compare the date against the
  59. old date that was saved the last time you booted (ran ClockCheck).
  60. If the current date is older than the saved date OR the current date is
  61. the same / too much newer than the saved date, ClockCheck will put up
  62. a requester telling you what's wrong.
  63.  
  64. When the requester pops up you will see the (computer's) current date.
  65. Now you should check if the date is the same as the real date.
  66. If the date was right, just click 'RIGHT', otherwise click 'WRONG'.
  67.  
  68. If you clicked 'RIGHT', the date will be saved to the file and the computer
  69. will continue the boot procedure as usual.
  70.  
  71. If you clicked 'WRONG', then this will happen;
  72.  
  73. The date will NOT be saved to the datefile.
  74.  
  75. The program will end with a WARN code.
  76.  
  77. If you have these lines after clockcheck, the timeprefs will pop up,
  78. allowing you to adjust the date and time to the correct ones:
  79.  
  80. If WARN
  81. SYS:Prefs/Time
  82. EndIf
  83.  
  84.  
  85. I hope this will make the function of the program clearer. This wasn't
  86. here in the original release of version 1.13, but as I've heard that there
  87. has been some problems to realize the real function of this program, I've
  88. decided to include this description in the version that I'm uploading
  89. to AmiNet.
  90.  
  91. The program has not been modified, just the document.
  92.  
  93. Installation
  94. ~~~~~~~~~~~~
  95. ¤ Set the clock to the current time and date.
  96. ¤ Copy the file ClockCheck to the c: directory (or anywhere else).
  97. ¤ Run ClockCheck. The first time the program will create a file named
  98.   ClockCheck.time in the ENVARC: directory.
  99. ¤ You should insert the line 'ClockCheck' in your s:User-Startup.
  100.  
  101. The program also has a couple of arguments:
  102.  
  103. DAYS=N   With this you can specify the maximum number of days that you want
  104.          shall be able to pass without notifying. The default is 1.
  105.          Replace N with a number corresponding your needs.
  106.  
  107. TIMEFILE This is used to specify an other file where the date will be saved.
  108.          The default is ENVARC:ClockCheck.time, but if you eg. use a kick-
  109.          switch and have two different ENVARC:s (one for both kickstarts),
  110.          then it can be better to define a name yourself.
  111.  
  112. USEVARS  If you specify this, two variables will be written at every boot,
  113.          LastBootTime and LastBootDate. Can be useful for scripts.
  114.          Contains the time and date of the last boot respectively.
  115.  
  116. VERBOSE  Print out the last boot time and day at every boot.
  117.  
  118. The program checks if the date is earlier or the too much later than the
  119. old date (the date saved in the file ENVARC:ClockCheck.time).
  120.  
  121. Using ClockCheck in script-files
  122. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  123. If you want to have the time-prefs executed automatically if the date
  124. was not right, then you can do like this:
  125.  
  126. .....
  127.  
  128. ClockCheck Days=7
  129.  
  130. If WARN
  131. SYS:Prefs/Time        ; Or any other path/program
  132. EndIf
  133.  
  134. ....
  135.  
  136. (insert these lines into your user-startup).
  137.  
  138.  
  139.  
  140.  
  141. History
  142. ~~~~~~~
  143. 1.0 (Stoneage)  Initial release
  144. 1.1 (Stoneage)  I got a request that I should add a WARN returncode if the
  145.                 date was not right (i.e. you selected 'Don't Save' in the
  146.                 requesters).
  147.                 See above for examples. I also optimized the code a bit
  148.                 (168 bytes smaller :^)
  149. 1.11 17-Oct-94  Minor modifications, and 'bug' fixes:
  150.                 I changed the version string.
  151.                 Changed it, so that the prefs file will be saved in ENVARC:,
  152.                 instead of in s: (the program was so old that I had used s:
  153.                 to save the prefs).
  154.                 Discovered a 'bug' in the text that is written the first time
  155.                 you run ClockCheck, the filename was incorrect.
  156.  
  157. 1.12 10-Nov-94  Don't remember...
  158.  
  159. 1.13 17-Dec-94  Optimized. Added an argument (TF=TimeFile) for specifying the
  160.                 name for the datefile. Added a small text that shows how much
  161.                 time that has gone since you booted (ran the program) last
  162.                 time. This can be interesting if you are debugging or
  163.                 something, and the computer crashes all the time =).
  164.  
  165. 1.14 05-Nov-95  The old source was lost, so I had to reconstruct the whole
  166.                 thing, but now it's finished.. I'm doing my military duty now,
  167.                 I've been there since 12th June this year, and I'm going to
  168.                 bee there to the 29th March 1996..
  169.                 - Det finns en plats på jorden, där solen aldrig ler,
  170.                   den platsen heter Boden, dit vill jag aldrig mer...
  171.                 So,
  172.                 to the new things. RESET argument removed (not needed anymore)
  173.                 VERBOSE and USEVARS arguments added.
  174.                 BootCount added. It will display the total amount of boots,
  175.                 since you installed ClockCheck.. Just an interesting thing.
  176.  
  177. ---------------------------------------------------------------------------
  178.  
  179.              Send bug reports, ideas, PD Programs etc. to:
  180.  
  181.                            Staffan Hämälä
  182.                            Pellovägen 268
  183.                            S-957 93 Pello
  184.                            SWEDEN
  185.