Article View: comp.sys.mac
Article #19422LSC bug?
From: Ted Johnson
Date: Mon, 21 Sep 1987 21:44
Date: Mon, 21 Sep 1987 21:44
32 lines
1235 bytes
1235 bytes
I'm having a very wierd problem with Lightspeed C's time() and ctime()
functions. They both print out the correct time, except that they're both
exactly 5 hours fast!!
#include <unix.h>
#include <stdio.h> /*I also included just about
every manager there is.*/
main()
{
unsigned long a;
unsigned long clock;
time(&a);
printf("%s", ctime(&a));
printf("%s", ctime(NULL));
}
This program printed out "Mon Sept 21 05:55:01 1987"
"Mon Sept 21 05:59:01 1987",
but my JClock said "0:59:01", so I know that the problem
isn't that my system clock is set wrong.
This wierd behavior occurs with v2.01 and v2.11 of LSC,
on a Mac SE HD20 running 4.1/5.5.
Any clues are greatly appreciated!
-Ted
UUCP: hplabs!hpcea!hpcid!tedj
Technical Details
Message-ID:
<3320019@hpcid.HP.COM>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!rutgers!labrea!decwrl!hplabs!hpcea!hpcid!tedjShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!rutgers!labrea!decwrl!hplabs!hpcea!hpcid!tedj From: tedj@hpcid.HP.COM (Ted Johnson) Newsgroups: comp.sys.mac Subject: LSC bug? Message-ID: <3320019@hpcid.HP.COM> Date: Mon, 21-Sep-87 17:44:41 EDT Article-I.D.: hpcid.3320019 Posted: Mon Sep 21 17:44:41 1987 Date-Received: Sat, 26-Sep-87 00:52:26 EDT Lines: 32