TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Jonathan de Boyne Pollard
from: Erik Huelsmann
date: 1996-11-08 12:29:44
subject: EMX & TZ-environment var

* Reply to message in ToMe

Replying to a message of Jonathan de Boyne Pollard to Erik Huelsmann:

 EH>> 
 >> Using EMX 09a fix06, I write dates to a file (UNIX dates,
 >> ie. offset in secs from 00:00 01 Jan 1970).
 EH>> 
 JdBP>   Strictly speaking, those are POSIX 1003.1 time values, not
"UNIX"
 JdBP> time   values.

 >> When the TZ environment variable is not set, other programs
 >> reproduce what I wrote to the file.
 >> 
 >> When the TZ environment-variable is set, EMX corrects the
 >> date for gmt-offset.
 EH>> 

 JdBP>   No it doesn't.  A time_t is a time_t, and (for your compiler) it
 JdBP> is   always a POSIX 1003.1 seconds-since-The-Epoch number.  The
 JdBP> value of the   TZ environment variable doesn't change the number.

Then I don't understand that FleetStreet does not understand the number
(posix date value) I write to a *.MSG file when the TZ variable is set.
In the case the TZ variable is not set FleetStreet does understand the
posix date value written to the *.MSG file... 

This cannot be a problem in the TZ handling of FleetStreet, because in the
fleetstreet session the TZ variable is always set...

 JdBP>   The value of the TZ environment variable changes the way that this  
 JdBP> number is translated into a "broken-down time" (i.e. a
`struct tm')
 JdBP> by   the localtime() function.

I did use that function too, but not to generate the message file. So the
possibility that the error is there can be ruled out too.

 JdBP>   The TZ environment variable is defined by POSIX, but not all C/C++  
 JdBP> compilers use it the same way (or even at all), since it isn't part
 JdBP> of   the Standard C Language (the conversion that localtime()
 JdBP> performs is   implementation-defined in Standard C, AFAIAA).

What do you mean by implementation-defined: the exact code lines are
defined, or the results are defined?

 >> JdeBP <

Bye, Erik!
PGPkey available by e-mail/netmail

 *** I am slowly getting there, but Sibyl is getting me there faster :-)
 *** (Sibyl=a devellopment-tool) Q's? e-mail me at ErikH{at}hcc-gron.idn.nl

---
* Origin: ORIGINal (2:500/19.1929)
SEEN-BY: 50/99 270/101 620/243 625/160 711/401 409 410 413 430 808 809 934
SEEN-BY: 711/955 712/407 515 624 628 713/317 800/1
@PATH: 500/19 9 28/777 2802/100 396/1 270/101 712/515 711/808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.