<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
<FONT size=2>
Seems inconsistent:<BR>
<BR>
<BR>
DateBsd.m3:<BR>
<BR>
<BR>
IF (z = NIL) OR (z^ = Local^) THEN<BR>
tm := Utime.localtime(ADR(tv.tv_sec));<BR>
ELSIF z^ = UTC^ THEN<BR>
tm := Utime.gmtime(ADR(tv.tv_sec));<BR>
ELSE<BR>
(* unknown timezone *)<BR>
<* ASSERT FALSE *><BR>
<BR>
<BR>
DatePosix.m3:<BR>
IF (z = NIL) OR (z^ = 0)<BR>
THEN EVAL Utime.localtime_r (tv.tv_sec, ADR (tm));<BR>
ELSE EVAL Utime.gmtime_r (tv.tv_sec, ADR(tm));<BR>
END;<BR>
<BR>
<BR>
DateBsd.m3 is the overwhelmingly used version, so presumably we should be like it.<BR>
<BR>
<BR>
readonly _DateImpls = {<BR>
"CYGWIN" : "DatePosix", (* hardly counts *)<BR>
"DARWIN" : "DateBsd",<BR>
"FREEBSD" : "DateBsd",<BR>
"HPUX" : "DatePosix", (* hardly counts *)<BR>
"INTERIX" : "DatePosix", (* hardly counts *)<BR>
"LINUX" : "DateBsd",<BR>
"NETBSD" : "DateBsd",<BR>
"NT" : "DatePosix", (* not actually used *)<BR>
"OPENBSD" : "DateBsd",<BR>
"SOLARIS" : "DatePosix", (* counts! *)<BR>
}<BR>
<BR>
<BR>
In both cases timezone is opaque but revealed to be a branded ref to an integer.<BR>
<BR>
<BR>
Of course, I'm going through this code again for purposes of porting to C, a) to remove struct tm, b) use <A href="http://code.google.com/p/y2038/">http://code.google.com/p/y2038/</A> c) remove struct_timeval/gettimeofday.<BR>
<BR>
<BR>
- Jay<BR></FONT> </body>
</html>