home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 16 Announce / 16-Announce.zip / tzvarbl.zip / TZ.Ascii next >
Text File  |  1996-10-12  |  7KB  |  124 lines

  1.  
  2.  This variable is used to describe the timezone information that the locale
  3.  will use.  To set TZ, use the SET which has the following format:
  4.  
  5.  >>--SET--TZ--=--SSS---------------------------->
  6.                       ------h-----------------
  7.                        -+-     -:--m---------  
  8.                        ---            -:--s-    
  9.  
  10.  >----------------------------------------------><
  11.     -DDD-----------------------------------
  12.            -,sm,sw,sd,st,em,ew,ed,et,shift-
  13.  
  14.  The values for the TZ variable are defined below. The default values given are for the built-in "C" locale 
  15.  defined by the ANSI C standard. 
  16.  
  17.  *----------------------------------------------
  18.  | Table 1. TZ Environment Variable Parameters
  19.  *--------------*---------------------------------------------*---------*
  20.  | VARIABLE     | DESCRIPTION                                 | DEFAULT | 
  21.  *--------------*---------------------------------------------*---------*
  22.  | SSS          | Standard-timezone identifier.  It must be   | EST     | 
  23.  |              | three characters, must begin with a letter, |         | 
  24.  |              | and can contain spaces.                     |         | 
  25.  *--------------*---------------------------------------------*---------*
  26.  | h, m, s      | The variable h specifies the difference (in | 5       | 
  27.  |              | hours) between the standard time zone and   |         | 
  28.  |              | coordinated universal time (CUT), formerly  |         | 
  29.  |              | Greenwich mean time (GMT).  You can         |         | 
  30.  |              | optionally use m to specify minutes after   |         | 
  31.  |              | the hour, and s to specify seconds after    |         | 
  32.  |              | the minute.  A positive number denotes time |         | 
  33.  |              | zones west of the Greenwich meridian; a     |         | 
  34.  |              | negative number denotes time zones east of  |         | 
  35.  |              | the Greenwich meridian.  The number must be |         | 
  36.  |              | an integer value.                           |         | 
  37.  *--------------*---------------------------------------------*---------*
  38.  | DDD          | Daylight saving time (DST) zone identifier. | EDT     | 
  39.  |              | It must be three characters, must begin     |         | 
  40.  |              | with a letter, and can contain spaces.      |         | 
  41.  *--------------*---------------------------------------------*---------*
  42.  | sm           | Starting month (1 to 12) of DST.            | 4       | 
  43.  *--------------*---------------------------------------------*---------*
  44.  | sw           | Starting week (-4 to 4) of DST.  Use nega-  | 1       | 
  45.  |              | tive numbers to count back from the last    |         | 
  46.  |              | week of the month (-1) and positive numbers |         | 
  47.  |              | to count from the first week (1).           |         | 
  48.  *--------------*---------------------------------------------*---------*
  49.  | sd           | Starting day of DST.                        | 0       | 
  50.  |              | 0 to 6 if sw != 0                           |         | 
  51.  |              | 1 to 31 if sw = 0                           |         | 
  52.  *--------------*---------------------------------------------*---------*
  53.  | st           | Starting time (in seconds) of DST.          | 3600    |
  54.  *--------------*---------------------------------------------*---------*
  55.  | em           | Ending month (1 to 12) of DST.              | 10      |
  56.  *--------------*---------------------------------------------*---------*
  57.  | ew           | Ending week (-4 to 4) of DST.  Use negative | -1      |
  58.  |              | numbers to count back from the last week of |         | 
  59.  |              | the month (-1) and positive numbers to      |         | 
  60.  |              | count from the first week (1).              |         | 
  61.  *--------------*---------------------------------------------*---------*
  62.  | ed           | Ending day of DST.                          | 0       | 
  63.  |              | 0 to 6 if ew != 0                           |         | 
  64.  |              | 1 to 31 if ew = 0                           |         | 
  65.  *--------------*---------------------------------------------*---------*
  66.  | et           | Ending time of DST (in seconds).            | 7200    |
  67.  *--------------*---------------------------------------------*---------*
  68.  | shift        | Amount of time change (in seconds).         | 3600    |
  69.  *--------------*---------------------------------------------*---------*
  70.  
  71.  For example: 
  72.  
  73.     SET TZ=CST6CDT
  74.  
  75.  sets the standard time zone to CST, the daylight saving time zone to CDT, and
  76.  sets a difference of 6 hours between CST and CUT. It does not set any values
  77.  for the start and end date of daylight saving time or the time shifted. 
  78.  
  79.  When TZ is not present, the default is EST5EDT, the "C" locale value. When
  80.  only the standard time zone is specified, the default value of n (difference
  81.  in hours from GMT) is 0 instead of 5.
  82.  
  83. {*** Note: This paragraph **** }
  84.  *** If you give values for any of sm, sw, sd, st, em, ew, ed, et, or shift, you
  85.  *** must give values for all of them. the entire statement is considered not
  86.  *** valid, and the time zone information is not changed. 
  87.  
  88. {For C/C++ programming }
  89.  The value of TZ can be accessed and changed by the tzset function. For more
  90.  information on tzset, see the C Library Reference. 
  91.  
  92. -- End of quoted text ---
  93.  
  94. Some further comments:
  95.  
  96.   Note that the above Marked paragraph says:
  97.   "ALL values for of ... must be given for any to have any meaning."
  98.  
  99.  
  100. The full Default value for TZ is
  101.   SET TZ=EST5EDT,4,1,0,3600,10,-1,0,7200,3600
  102.  
  103.  And it's meaning in a more non-programmer fromat:
  104.   TZ repesentation ............ = EST+5EDT,4,1,0,3600,10,-1,0,7200,3600
  105.   Standard string ............. = EST
  106.   Offset from UTC (seconds) ... = -05:00:00 (-18000)
  107.   Daylight savings string ..... = EDT
  108.   Daylight savings is ......... = Observed
  109.     Start information ......... = 4,1,0,3600
  110.       Month ................... =   4 April
  111.       Week of month ........... =   1 from the beginning of month
  112.       Day of week ............. =   0 Sunday
  113.       Time of day ............. =  01:00:00 (3600)
  114.       Starts this year ........ = Sun,  7 Apr 1996 01:00:00
  115.     End information ........... = 10,-1,0,7200
  116.       Month ................... =  10 October
  117.       Week of month ........... =  -1 from the end of month
  118.       Day of week ............. =   0 Sunday
  119.       Time of day ............. =  02:00:00 (7200)
  120.       Ends this year .......... = Sun, 27 Oct 1996 02:00:00
  121.     Difference is ............. = +01:00:00 (3600)
  122.  
  123.  
  124.