🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #51778

Oh, tempora!

#51778
From: Michael H. Glenn
Date: Sat, 27 Mar 1993 00:07
34 lines
1230 bytes
Hi folks:

Having a time problem w/DJGPP:

Tried...

   struct tm *today;
   struct timeval t;

   gettimeofday(&t,NULL);
   today = localtime(&t.tv_sec);

...and...

   struct tm *today;
   u_long clock;

   (void) time(&clock);
   today = localtime(&clock);

...both return an integer value of 2147482596; which equates to
Thu Jan 1 12:28:12 1970 (as per ctime()). So something's definitely
rotten here.

I also noticed the time it gave me was five zones west of my location(???).

So we're either not setting things correctly, or something in DJGPP
really stinks. Probably the former.

How'm I screwing up?

Thanx in advance...

--------->Mike.
Technical Details
Message-ID: <2942265833.2.wk05071@worldlink.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!psinntp!wrldlnk!usenet

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,bffc4ea64e3fbe73,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-03-27 01:43:32 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!sparky!uunet!psinntp!wrldlnk!usenet
From: "Michael H. Glenn" <wk05071@worldlink.com>
Subject: Oh, tempora!
Message-ID: <2942265833.2.wk05071@worldlink.com>
Sender: usenet@worldlink.com
Nntp-Posting-Host: 127.0.0.1
Organization: Performance Systems Int'l
Date: Sat, 27 Mar 1993 00:07:36 GMT
X-Mailer: WORLDLink-DOS (3.3)
Lines: 39