home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / gettz11.zip / ReadMe < prev    next >
Text File  |  1998-01-09  |  6KB  |  138 lines

  1.  
  2. /*
  3. ** GetTZ 1.1 freeware 1/1998
  4. */
  5.  
  6. Greetings.
  7.  
  8. GetTZ is a simple command line utility written to solve an annoying
  9. problem. Every time change (twice a year), I have to change the time
  10. zone in several applications, select settings, find the right page
  11. and make the change. This is particularly annoying in mail and news
  12. applications because the time stamp on the post/message includes
  13. the timezone.
  14.  
  15. GetTZ parses the environment TZ string (Config.sys 'SET TZ=') for
  16. the timezone, summer time offset and the start and stop times
  17. for summer time (daylight savings time for USA). It then sets
  18. the current time zone into the appropriate value in the Ini file.
  19.  
  20. For PMMail and PMINews, I set up a Rexx Exit that calls GetTZ.EXE
  21. with the correct parameters each time the program is started.
  22.  
  23. Note that if you have an application running during the time change
  24. it will probably not pick up the altered value from the ini file until
  25. restarted.
  26.  
  27. To Use:
  28.  
  29.   1. Copy the GetTZ.EXE file to any directory in your PATH statement
  30.      in config.sys (I use \UTILS\BIN\ for all my small utilities).
  31.  
  32.   2. Execute the program with no parameters, 'GetTZ' and observe the
  33.      output on the screen.
  34.  
  35.         First line:  'SET TZ=MMMnMMM.....' is the environment string
  36.                      found in your config.sys file, make sure it is
  37.                      correct.
  38.         Second line: 'TimeZone is nn, Winter(Standard) Time' or
  39.                      'TimeZone is nn, Summer(Daylight) Time'
  40.                      Make sure this is correct, to fix your
  41.                      config.sys file setting you can use TZCalc.Exe
  42.                      distributed free with TIME868.Zip.
  43.         Third line:  'GetTz /h for more help'
  44.  
  45.   2A. Execute the program again with the correct parameters
  46.       for either PMMail or PMINews (see paragraph below).
  47.       If you see nothing on the screen, the ini file has
  48.       been updated correctly. Otherwise there may be a
  49.       file error message displayed, this means it could
  50.       not find the ini file.
  51.                      
  52.   3. PMMAIL:
  53.  
  54.         Copy the SetIniTZ.cmd to your PMMail directory, then
  55.         edit and correct the GetTZ line correcting the path:
  56.  
  57.         'GetTZ C:\SOUTHSDE\PMMAIL\PMMAIL.INI GLOBAL TZOFFSET'
  58.  
  59.         In PMMail select PMMAIL->Settings->Rexx and set the
  60.         'program open exit' to:
  61.  
  62.             Enabled -      checked
  63.             Execute in Foreground - unchecked (this will run in the background)
  64.             Script - C:\SOUTHSDE\PMMAIL\SetIniTZ.cmd
  65.  
  66.   4. PMINEWS:
  67.  
  68.         Copy the SetIniTZ.cmd to your PMINEWS directory, then
  69.         edit and correct the GetTZ line correcting the path:
  70.  
  71.         'GetTZ C:\SOUTHSDE\PMINEWS\PMINEWS.INI GLOBAL TZOFFSET'
  72.  
  73.         In PMINEWS select PMINEWS->Settings->Rexx Exits and set the
  74.         'program open exit' to:
  75.  
  76.             Enabled -      checked
  77.             Execute in Foreground - unchecked (this will run in the background)
  78.             Script - C:\SOUTHSDE\PMINEWS\SetIniTZ.cmd
  79.  
  80.  Format of the SET TZ= line in your config.sys uses the IBM standard
  81.  which is not exactly the same as the unix standard. Support for the
  82.  unix standard using the environment string EMXTZ= may be added later.
  83.  
  84.             Default is EST5EDT,4,1,0,7200,10,-1,0,7200,3600
  85.  
  86.               where the various parts are:
  87.  
  88.      EST and EDT are arbitrary labels for the winter and summer
  89.      clocks of your locality; the 5 between them means winter time
  90.      here is 5 hours behind GMT.
  91.  
  92.          NOTE : The number 5 can actually be in the format hh:mm:ss
  93.                 if your offset from GMT is not an even hour. Version
  94.                 1.1 handles this correctly.
  95.  
  96.      The next four numbers are respectively the month, week of the
  97.       month, and day of the week on which the winter to summer
  98.      transition takes place and the 24-hour time at which this
  99.      happens. (Sunday is day 0 for this purpose). The default shown
  100.            here is the first Sunday in April at 02:00 hours.
  101.  
  102.     The following four numbers are the same thing for the summer
  103.     to winter transition. The default shown here is the last Sunday
  104.            in October at 02:00 hours.
  105.  
  106.     The last number is the number of seconds that the summer clock
  107.     is advanced past the winter clock, here 3600 seconds -- one hour.
  108.  
  109. If you don't know the settings for your area, get the TZCALC.EXE that
  110. comes with the freeware TIME868.EXE and use it.
  111.  
  112. Now every time you start PMMail and PMINews the timezone used by the
  113. program to stamp messages will be correct whether you are in summer
  114. or winter time or even if you move to another timezone (provided you
  115. correct your Config.Sys entry<g>.
  116.  
  117. NOTE: PMMail and PMINews only read the ini file on startup, if you run
  118.       this utility while they are running OR the timezone changes
  119.       (for example at the DST switch time) while they are running,
  120.       they will both be using the wrong timezone until they restart!
  121.        
  122. The program source is included gratis, you are free to do whatever you
  123. want with it.           
  124.  
  125. History:
  126.  
  127. 1.1 Fixes a bug that prevented setting the changes in the .ini file
  128.     even though the string was parsed correctly and arguments were
  129.     correct.
  130.  
  131.     Changes slightly the interpretation of the start and stop times in the
  132.     SET TZ= string to more closely conform to the IBM standard. See the .cpp
  133.     for details.
  134.  
  135.     Added support for hh:mm:ss format of the timezone offset number that
  136.     is in-between the two three-character ascii strings.
  137.  
  138.