[GEM Development] TZ Environment Variable and This Weekend

Thomas Clayton topcatdrc at yahoo.com
Wed Mar 7 12:31:24 PST 2007


Dear Group:

Since you're all so advanced, this probably won't come as any surprise:
Daylight Savings Time (DST) starts THIS weekend - NOT the last one of
the month as WAS usual. There was some discussion of this on another
list (POSSI) that I belong to. So I figured I just give you the 'gist'
of solution here.

"
While setting up EMX run-times on my computer - to TRY and get
CD/Record to work (for use with UpDCD) - I noticed in the accompanying
*.INF file the exact 'syntax' for the TZ environment variable. I'll
state / post  it here because it is textual and (fairly) clear.


>From ~~Eberhard Mathias's~~ EMXRT Inf file (with spacing, paragraphs,
and two [inserts]  from me):

""
The TZ environment variable controls how to compute Coordinated
Universal Time (UTC aka GMT) from local time.  (Note that under Unix,
TZ is used for computing local time from UTC as UTC is used for the
system clock under Unix; under OS/2 and DOS, local time is used for the
system clock.) 


The value of TZ has the following format: 
TZ1[OFF,[TZ2[,SM,SW,SD,ST,EM,EW,ED,ET,SHIFT]]] 

TZ1 is the three-letter name of the standard timezone. 

OFF is the offset to Coordinated Universal Time; positive values are to
the west of the Prime Meridian, negative values are to the east of the
Prime Meridian.  The offset can be specified as hours, hours and
minutes, or hours, minutes, and seconds.  Hours, minutes, and seconds
are separated by colons.  If OFF is not specified, an offset of 0 will
be used (this may change in the future). 

TZ2 is the three-letter name of the summer timezone (daylight saving
time).  If TZ2 is not specified, daylight saving time does not apply. 
If TZ2 is specified, daylight saving time does apply[.]

 [T]he remainder of the TZ's value specifies when and how to change to
and back from daylight saving time.  SM through ST define, in current
local time, when to switch from standard time to daylight saving time,
EM through ET define, in current local time, when to switch from
daylight saving time to standard time.  (On the southern hemisphere,
the end date precedes the start date.)  SHIFT is the amount of change
in seconds. 

 SM specifies the month (1 through 12) of the change.  SW specifies the
week of the change; if this value is zero, SD specifies the day of
month (1 through 31).
  If SW is positive (1 through 4), the change occurs on weekday SD
(0=Sunday through 6=Saturday) of the SWth week of the specified month. 
The first week of a month starts on the first Sunday of the month.
  If SW is negative (-1 through -4), the change occurs on weekday SD
(0=Sunday through 6=Saturday) of the -SWth week of the specified month,
counted from the end of the month (that is, -1 specifies the last week
of the month).  The last week of a month starts on the last Sunday of
the month.
  ST specifies the time of the change, in seconds.  Note that ST is
specified in local standard time and ET is specified in local daylight
saving time.

Example: 
CET-1CED,3,-1,0,7200,10,-1,0,10800,3600
  In this example, the name of the standard time zone is CET, the name
of the summer time zone is CED.  Daylight saving time starts at 2:00 on
the last Sunday of March and ends at 3:00 on the last Sunday of
October.  Time changes by one hour in daylight saving time. 

If no characters follow TZ2, the rule `,4,1,0,3600,10,-1,0,7200,3600'
will be used: Daylight saving time starts at 1:00 on the first Sunday
of April and ends at 2:00 on the last Sunday of October.  Time changes
by one hour in daylight saving time.
""

"
"
I hope its all clear for everyone who needs it. 
We'll see this weekend if YOU got the "Set TZ= ..." correct.

Me? I just intend to 'turn the clock' forward an hour,
 the next time I turn it on, after the change occurs. 
We keep REAL accurate time here! ;-)

(Hopefully the airlines, etc. don't do it MY way!)
"


Sincerely,

Thomas Clayton


 
____________________________________________________________________________________
Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html


More information about the gem-dev mailing list