[comp.lang.c++] Where is timegm?

seant@ntpal.UUCP (Sean Thompson) (07/21/90)

Hello, I am relatively new to programming in C++, being one of the first
at BNR Richardson to 'test the water' of object oriented programming. 
I am responsible for writing a piece of code that must take a time and
date and convert it for storage as a time_t (long) type. The best functions
I can think of for the task are timegm and timelocal.  However, while
they have always worked fine for me in C, I am having trouble compiling the
code in C++. I have included the C++ version of time.h as the manual pages
tell me to, but this .h file does not define these functions (only gmtime,
localtime, time, etc...).  Is there something I am missing? Are my AT&T 
v2.0 C++ include files wrong?

I would appreciate any help you can give me on this.

Thanks in advance,
Sean Thompson
Bell Norther Research, Richardson Tx

PS. My mailer is screwed up - so please post answers, I will not receive email.

steve@taumet.com (Stephen Clamage) (07/22/90)

seant@ntpal.UUCP (Sean Thompson) writes:

>The best functions
>I can think of for the task are timegm and timelocal....
>... this .h file does not define these functions (only gmtime,
>localtime, time, etc...). 

ANSI C defines funcions gmtime and localtime.  Evidently your
local C implementation used functions with different names (and
possibly different workings).  Check the old manual for the old
functions' specifications, and the new manual (or an ANSI C text)
for the the new functions' specifications.  You should find the
changes easy to make.
-- 

Steve Clamage, TauMetric Corp, steve@taumet.com