help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Time handling


From: Guy Harrison
Subject: Re: Time handling
Date: Sat, 14 Aug 2004 04:00:39 GMT
User-agent: KNode/0.7.7

Dave Parker wrote:

> I need some pointers to handling/converting time
> values.  I'm reading a file from a legacy DOS
> application that uses a time_t type.  This is a
> typedef for a long.  I understand that this is the
> number of seconds since midnight, January 1, 1970.

Yes. "time_t" is a standard C (and C++) type so you can find out about that 
on any forum discussing standard languge (eg comp.lang.c). You may or may
not need to know about "struct tm", julian time etc (depends on answers
below I'd imagine).

> I would like to convert it to a double - the integer
> part which is the number of days that have passed
> since 12/30/1899, and the fractional part is the fraction
> of the 24 hour day that has elapsed. (This is the Delphi
> format, and maybe the format for other languages and
> systems.  But I'll doing the conversion in C/C++).
> 
> Has this been solved before?  Where should I look?

Borland carry their own news servers...

 newsgroups AT borland d0t com

...note that the VCL is written in Delphi so probably best to try one of the
general C++ Builder groups but don't be surprised if you end up in a delphi
one. Professional versions of BCB come with the VCL source so someone ought
to be able to tell you.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]