home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 296.lha / DST_v1.05 / dst.doc < prev    next >
Text File  |  1989-10-09  |  5KB  |  91 lines

  1.        Program:  dst
  2.     Programmer:  George Kerber
  3.        Written:  05/29/89 - 07/08/89
  4.        Version:  1.05
  5.    Application:  AmigaDOS
  6.        Purpose:  This utility will always insure that the system clock 
  7.                  (not the battery backed-up clock) will always be correct
  8.                  during Daylight Savings Time or Standard Time.
  9.   Requirements:  "Battery backup-clock" and AmigaDOS 1.3.
  10.          
  11.     Directions:  Add "dst [opt]" to your startup-sequence after the battery
  12.                  clock has been read and env: has been created and assigned.
  13.  
  14.                  Set your battery clock to STANDARD TIME in your area.
  15.  
  16.                  These commands need to be in your startup-sequence before
  17.                  running "dst".  Note:  these commands are standard when
  18.                  using AmigaDOS 1.3, but should work ok if using 1.2.
  19.  
  20.                  makedir ram:env
  21.                  assign env: ram:env
  22.                  
  23.                  Everytime the Amiga is booted, the "dst" utility will then
  24.                  read the system clock and extract the year.  Then the start
  25.                  and stop date for Daylight Savings time will be calculated
  26.                  for the current year.  If the current date falls between
  27.                  these dates, the system clock will be incremented by one
  28.                  hour for Daylight Savings Time.  If "dst" is run again
  29.                  after the initial time, "dst" will do nothing to the
  30.                  system clock.
  31.  
  32.                  Options:  dst e  -- Eastern Region
  33.                            dst c  -- Central Region
  34.                            dst m  -- Mountain Region
  35.                            dst p  -- Pacific Region
  36.                            dst d  -- Generic 
  37.  
  38.                            dst f  -- Force evaluation
  39.                            dst ?  -- Short help screen
  40.  
  41.                  Using any one of the first group of options will cause "dst"
  42.                  to display the current zone time.
  43.  
  44.                  Example:  dst m    -----returns--->  Mountain Daylight Time
  45.                                                 or->  Mountain Standard Time
  46.               
  47.                  To set the correct timezone, but have no output to the
  48.                  screen, send the output to :NIL.
  49.  
  50.                            dst >NIL: m
  51.  
  52.                  Using the "f" option will cause "dst" to increment the
  53.                  system clock if it is currently Daylight Savings Time
  54.                  even if it's already been incremented.
  55.              
  56.       
  57. Considerations:  The "dst" utility knows that Daylight Savings Time actually
  58.                  begins and ends after 2am on it's start and stop date.
  59.  
  60.                  "dst will not do anything to the system clock if the
  61.                  computer is running at the change over date and time.
  62.                  I figured that very few people are using their computers
  63.                  at 2am.  Nor will "dst" decrement the system clock if
  64.                  invoked right after the Daylight Savings Time stop date and
  65.                  time.  None of this should be a problem.  There is a "cron"
  66.                  type program available on the boards that could be run and
  67.                  would fix everything (if I had written "dst" to accommodate
  68.                  it), but it sure didn't seem worth all the work and
  69.                  computer overhead using cron that would only be necessary
  70.                  twice a year if the user was actually using the Amiga at
  71.                  2am on the start and stop dates. 
  72.  
  73.                  "dst" will set an environmental variable called "TIMEZONE"
  74.                  with the current timezone.  This will be STD or DST if no
  75.                  option is given when "dst" is initially executed.  If the
  76.                  correct option is given when first executed, then "TIMEZONE"
  77.                  will contain the correct timezone for your area.  TIMEZONE
  78.                  is used by a program called "udate" which is UNIX like and
  79.                  is a replacement for the AmigaDOS date command.
  80.  
  81.         Status:  This is public domain, but please keep me as author and
  82.                  keep all the documentation intact.  Anyway, if something
  83.                  is wrong with this program, I'm not responsible.....
  84.  
  85.  
  86.   Version 1.05:  This version works identically as the previous version that
  87.                  was uploaded, except that the environmental variable
  88.                  TIMEZONE now contains the current timezone.  This variable
  89.                  is used if available by the udate program, which is a 
  90.                  UNIX like date command.  Udate is public domain too.
  91.