Re: Number of Years
- From: Keith Thompson <kst-u@xxxxxxx>
- Date: Sun, 12 Mar 2006 21:27:51 GMT
"Richard G. Riley" <rgrdev@xxxxxxxxx> writes:
On 2006-03-12, Keith Thompson <kst-u@xxxxxxx> wrote:[...]
"Richard G. Riley" <rgrdev@xxxxxxxxx> writes:
type.There you have all your discrete time elements at your beck and
call. I cant vouch for platform independance though. In my debugger I
see:
$3 = {tm_sec = 17, tm_min = 23, tm_hour = 17, tm_mday = 12, tm_mon = 2,
tm_year = 106, tm_wday = 0, tm_yday = 70, tm_isdst = 0, tm_gmtoff = 3600,
tm_zone = 0x804a040 "CET"}
Better yet, look at the actual specification of the "struct tm"
Interesting point : the dump was more to show the "human readable
numbers", but I'm not so impressed with the man page definition
disagreeing with the compile time structure definition. Not that it
makes one iota of differenc for the problem in hand : possibly more
important in std.c.
What are you unimpressed about? The standard specifically says that
an implementation is allowed to add extra members. I don't know what
the man page says; it could follow either the standard or the
system-specific definition (if it does the latter, it should
acknowledge that two of the fields are implementation-defined.
Reading n1124 (or some other draft of the standard) would have avoided
this confusion.
But you would agree this is a tidier way of solving this problem?
If by "this" you mean using a debugger, no. If you mean using
localtime() rather than doing arithmetic on time_t values, I've
already addressed that point in this thread.
--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
.
- Follow-Ups:
- Re: Number of Years
- From: Richard G. Riley
- Re: Number of Years
- References:
- Number of Years
- From: Gregc.
- Re: Number of Years
- From: David Paleino
- Re: Number of Years
- From: Richard G. Riley
- Re: Number of Years
- From: Keith Thompson
- Re: Number of Years
- From: Richard G. Riley
- Number of Years
- Prev by Date: Re: Number of Years
- Next by Date: Re: Number of Years
- Previous by thread: Re: Number of Years
- Next by thread: Re: Number of Years
- Index(es):
Relevant Pages
|