[comp.unix.microport] Are ctime/localtime busted?

bill@ssbn.WLK.COM (Bill Kennedy) (02/05/89)

In article <1135@ssbn.WLK.COM>, I wrote:
[ asking if ctime and localtime were broken in V/AT 2.4 ]
> 
> This is so bizarre that I would prefer email responses,

Not a bug at all, a stupid and amateur combination of cockpit problems
and RTFM.  There's absolutely NOTHING wrong with time, ctime, or any
of them if you declare and code correctly.  Sorry for the false alarm,
thanks to those who replied.
-- 
Bill Kennedy  usenet      {killer,att,cs.utexas.edu,sun!daver}!ssbn!bill
              internet    bill@ssbn.WLK.COM

debra@alice.UUCP (Paul De Bra) (02/05/89)

In article <1135@ssbn.WLK.COM> bill@ssbn.WLK.COM (Bill Kennedy) writes:
}This one is a puzzle and I suspect that it is something peculiar
}in my system.  It's V/AT 2.4, 4Mb RAM, 12MHz, plenty of disk space.
}If I run the example code below with the V/AT system I get a date
}and time that wander all over the place.  If I run it on ssbn
}(AT&T 386 UNIX Vr3.1) it works correctly every time.  I should add
}that the V/AT date(1) works OK and setup shows that the cmos time
}is correct too.  Here's the sample and the answers I got:
}...
}	long systime, time();
}...
}	systime = time( (long *) 0 );
}...

I've seen this bug in several versions of Unix.

On some systems time(0L) doesn't work.
time(tloc) where tloc is a (properly initialized) pointer to a long
should work.

Paul.
-- 
------------------------------------------------------
|debra@research.att.com   | uunet!research!debra     |
------------------------------------------------------