

                                
                                          
                                      
                                    
                                  
                                            
                                  
 



copyright 1993 by Mark Bernard

Maximus copyright by Scott Dudley.
BinkleyTerm copyright by Bit Bucket Software.


Use at your own risk an all that usual stuff.... no guarantees whatsoever.


-Features:

-Ability to set your cpu clock with data received with your caller-id
 information. It does this with the first BBS caller that calls after the 
 program is "Loaded" by using the EasyLoad.cmd. (This just creates a simple
 flag-file that EasyTime looks at. If the flag-file says that it's "unloaded",
 the script simply exits.  If the file is "loaded", then it changes the time on
 your cpu. Can be loaded as frequently as you wish, by placing in one of your
 regular routines in your binkley.cmd!
-Ability to take different time-zones into account (BUT always relative to the
 local time received from the caller-id, so has to be reset as time changes 
 to daylight savings and back). This can be remedied... see below.
-Ability to log the time-changes (logs the cpu date/time before the time 
 re-set, and after).

Compatability:

Tested on:

486-33, 8MB RAM.
Running OS/2 2.0 (GA + kernal fix + SOM fix + REXXUtil update), and OS/2 2.1 GA.

Using Binkley 2.56, Maximus 2.01wb.

Supra 14.4 Faxmodem with 1.2J, and 1.70B-04 ROMs. (That DO NOT SUPPORT
caller-id in my telephone exchange... so I made it work anyway!)


Installation:

 1) Copy files.

   a) Copy EasyTime.cmd and EasyLoad.cmd to your maximus directory
  
2) Edit Files.

   a) Edit your EasyTime.cmd configuration (first lines of file).

      i) Paths and Filenames. (include full paths! and BE ACCURATE!!!)

         LogFile: Should be your binkley.log file.

         FlagFile: File that tells the script if the program is "loaded" or not.
                  If "loaded", it will reset the cpu time with the next BBS 
                  caller. MUST be the same as specified in EasyLoad.cmd!

         EasyOnLog: File where records of time-resetting are kept. Can be the 
                  same as used for EasyOn.

      ii) Options

         LogTimeChange: If enabled, will log changes to system time.

      iii) Other

         TimeZone: Offset from local time (23 hrs) in full hours only (sorry 
                  Newfoundland). This will have to be re-set as the local time 
                  changes to daylight savings and back. (No problem if always 
                  set to 0 (local time). Positive values should omit the "+"
                  sign.
 
         DateString: The string returned from your modem that precedes the 
                  date ("Date =" on the Supra). The date must be in the form
                  "mmdd".  I don't know how standard this is.

         TimeString: The string returned from your modem that precedes the
                  time ("Time =" on the Supra). The date must be in the form
                  "hhmm".  Again, I don't know how standard this is

         ConnectString: A string that is ALWAYS in your LogFile (Binkley.Log),
                  and located, AFTER the caller-id info.  This is used as an
                  error checking tool to ensure that if caller-id is disabled 
                  for some reason, then the information won't be used.

                  Note: I made mine "Connect " (note the space to differentiate 
                        from "Connection"

   b) Edit your EasyLoad.cmd configuration (first lines of file).

      i) Paths and Filenames. (include full paths! and BE ACCURATE!!!)


         FlagFile: File that tells the script if the program is "loaded" or not.
                  If "loaded", it will reset the cpu time with the next BBS
                  caller. MUST be the same as specified in EasyTime.cmd!



   b) Edit your SpawnBBS.cmd

      example (where CmdFile = "[path]\maxp\EasyBBS.cmd")


        cd\maxp
        call EasyTime.cmd
        call EasyOn.cmd %1 %2 %3 %4 %5 %6 %7 %8 %9
        call EasyBBS.CMD

rem Max loading without EasyOn
rem maxp -b%2 -p%3 -t%4 -s%1 -n2 -lLine2.log -z\pipe\snoop2

     [rest deleted]
 
   c) Edit your binkley.cfg

      Edit the Answer line (if necessary) so that your modem answers incoming
      calls AFTER the second ring. The caller-id information is received
      between the first and second rings. You can play with this string, but
      after fiddling a bit, I found putting "~~~" before the "ATA worked.
      Two ~'s only worked some of the time, three ~'s worked everytime.
      I also played with the "S0" register, but didn't have much success.


   d) Edit your Binkley.cmd

      In one of your routines, (weekly, monthly or whatever) place the line:

      call EasyLoad.cmd


      When this is run, it will change the flag-file to a "loaded" state, and
      prepare EasyTime to re-set the system clock with the next caller to your 
      BBS.


You're done!!

Notes:

   You can run EasyLoad from the command line no problem, but if you try to 
   run EasyTime while LogFile is pointing to a file in use, it won't run.
   If you want to test it, copy your Binkley.log to another directory, and edit 
   the configuration to point to it. (Make sure you run EasyLoad first.)

   I tried to work out my logic properly, and covered changes of overlapping
   days/months and years (even leap years).  (I had to use system year, as 
   caller-id doesn't provide this information....)

   Because caller-id doesn't return "seconds", I use :30 to split the 
   difference.

   If you want to have the time-zone set "automatically", make a couple copies
   of EasyTime.cmd (EasyTimS.cmd and EasyTimD.cmd for standard and daylight 
   savings respectively) and have the appropriate time-zone set in each.  Then, 
   you can edit your Binkley.log and Binkley.evt files so that on the day that
   daylight savings comes into effect, you exit to an errorlevel that calls the
   line "copy EasyTimD.cmd EasyTime.cmd" and on the day that it reverts back 
   to standard time, "copy EasyTimS.cmd EasyTIme.cmd".

