Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: What about my last date functions? there are some error? |
| Date | 2016-11-08 12:05 -0800 |
| Organization | None to speak of |
| Message-ID | <lnh97hrb3q.fsf@kst-u.example.com> (permalink) |
| References | (2 earlier) <nvsd9k$nd4$1@dont-email.me> <871sym9dpv.fsf@bsb.me.uk> <nvstum$jt5$1@dont-email.me> <87bmxp978j.fsf@bsb.me.uk> <nvt73j$o68$1@dont-email.me> |
Richard Heathfield <rjh@cpax.org.uk> writes:
> On 08/11/16 18:06, Ben Bacarisse wrote:
> <snip>
>> I suspect your preferred code will not go that far
>> out on exactly the same systems that have a limited range of time_t
>> values.
>
> You're right, of course. Nevertheless, it's still a win over time_t.
> Let's assume time_t uses a long int under the bonnet, and let's further
> assume that it encodes seconds (a not uncommon implementation, as we
> both know). On a 32-bit-long-int system, that gives us a range of 49710
> days, which is 136+ years. Julian dates, on the same system, can cover
> well over 11,000,000 years.
>
> I have no particular need for /millions/ of years, at least not yet, but
> I find the ability to stretch back through the second millennium (and
> even into the first) to be useful from time to time.
Desktop Unix-like systems these days tend to make time_t a 64-bit signed
integer.
On the other hand, 32-bit systems still exist. They can still be
updated to use a 64-bit time_t, and I expect that's what will happen
between now and 2038, but so far I haven't heard of a system with 32-bit
long int and 64-bit time_t.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
What about my last date functions? there are some error? Rosario19 <Ros@invalid.invalid> - 2016-11-08 11:28 +0100
Re: What about my last date functions? there are some error? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-11-08 10:55 +0000
Re: What about my last date functions? there are some error? "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-11-08 19:00 +0800
Re: What about my last date functions? there are some error? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-11-08 11:04 +0000
Re: What about my last date functions? there are some error? "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-11-08 19:22 +0800
Re: What about my last date functions? there are some error? Richard Heathfield <rjh@cpax.org.uk> - 2016-11-08 11:35 +0000
Re: What about my last date functions? there are some error? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-11-08 15:46 +0000
Re: What about my last date functions? there are some error? Richard Heathfield <rjh@cpax.org.uk> - 2016-11-08 16:20 +0000
Re: What about my last date functions? there are some error? Rosario19 <Ros@invalid.invalid> - 2016-11-08 17:44 +0100
Re: What about my last date functions? there are some error? Richard Heathfield <rjh@cpax.org.uk> - 2016-11-08 16:51 +0000
Re: What about my last date functions? there are some error? Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-08 13:21 -0500
Re: What about my last date functions? there are some error? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-11-08 18:06 +0000
Re: What about my last date functions? there are some error? Richard Heathfield <rjh@cpax.org.uk> - 2016-11-08 18:56 +0000
Re: What about my last date functions? there are some error? Keith Thompson <kst-u@mib.org> - 2016-11-08 12:05 -0800
Re: What about my last date functions? there are some error? David Brown <david.brown@hesbynett.no> - 2016-11-08 21:10 +0100
Re: What about my last date functions? there are some error? Richard Heathfield <rjh@cpax.org.uk> - 2016-11-08 20:16 +0000
Re: What about my last date functions? there are some error? jadill33@gmail.com - 2016-11-08 11:16 -0800
Re: What about my last date functions? there are some error? Richard Heathfield <rjh@cpax.org.uk> - 2016-11-08 20:08 +0000
Re: What about my last date functions? there are some error? Keith Thompson <kst-u@mib.org> - 2016-11-08 12:11 -0800
Re: What about my last date functions? there are some error? Keith Thompson <kst-u@mib.org> - 2016-11-08 12:29 -0800
Re: What about my last date functions? there are some error? Rosario19 <Ros@invalid.invalid> - 2016-11-08 17:41 +0100
Re: What about my last date functions? there are some error? asetofsymbols@gmail.com - 2016-11-08 11:26 -0800
Re: What about my last date functions? there are some error? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-11-08 19:38 +0000
Re: What about my last date functions? there are some error? Keith Thompson <kst-u@mib.org> - 2016-11-08 08:19 -0800
csiph-web