Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

TRANSACTION CANCELLED - FARECARD RETURNED


devel / comp.lang.c / Re: "Year 2038 problem is still alive and well" by CookiePLMonster

SubjectAuthor
* "Year 2038 problem is still alive and well" by CookiePLMonsterLynn McGuire
+* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterSiri Cruise
|+* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterRichard Damon
||+* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterBen Bacarisse
|||+* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterKeith Thompson
||||+* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterSiri Cruise
|||||+* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterDavid Brown
||||||+* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterManfred
|||||||`- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterDavid Brown
||||||`* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterSiri Cruise
|||||| `* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterDavid Brown
||||||  `* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterDavid Brown
||||||   `* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterÖö Tiib
||||||    `* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterKeith Thompson
||||||     +- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterÖö Tiib
||||||     `* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterDavid Brown
||||||      +- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterScott Lurndal
||||||      `* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterManfred
||||||       +* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterLynn McGuire
||||||       |`* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterKenny McCormack
||||||       | `- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterVir Campestris
||||||       +* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterDavid Brown
||||||       |`* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterBart
||||||       | `* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterDavid Brown
||||||       |  +* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterDan Purgert
||||||       |  |+* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterDavid Brown
||||||       |  ||+* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterDan Purgert
||||||       |  |||+* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterOtto J. Makela
||||||       |  ||||+* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterSiri Cruise
||||||       |  |||||+- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterMalcolm McLean
||||||       |  |||||+* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterStef
||||||       |  ||||||`* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterSiri Cruise
||||||       |  |||||| +- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterDavid Brown
||||||       |  |||||| `- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterScott Lurndal
||||||       |  |||||`* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterKeith Thompson
||||||       |  ||||| `- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterSiri Cruise
||||||       |  ||||+* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterLynn McGuire
||||||       |  |||||`* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterSiri Cruise
||||||       |  ||||| +* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterLynn McGuire
||||||       |  ||||| |`- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterDavid Brown
||||||       |  ||||| `- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterKenny McCormack
||||||       |  ||||`- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterDan Purgert
||||||       |  |||`- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterDavid Brown
||||||       |  ||`* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterScott Lurndal
||||||       |  || `- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterDavid Brown
||||||       |  |`* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterVir Campestris
||||||       |  | `* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterScott Lurndal
||||||       |  |  `* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterKaz Kylheku
||||||       |  |   `* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterScott Lurndal
||||||       |  |    `- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterVir Campestris
||||||       |  `- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterStef
||||||       `- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterScott Lurndal
|||||`- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterKaz Kylheku
||||`* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterDavid Brown
|||| `* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterMalcolm McLean
||||  +* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterDan Purgert
||||  |`* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterMalcolm McLean
||||  | +- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterDan Purgert
||||  | +* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterScott Lurndal
||||  | |`* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterMalcolm McLean
||||  | | `- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterDavid Brown
||||  | `- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterKeith Thompson
||||  +* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterDavid Brown
||||  |`* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterBen Bacarisse
||||  | `- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterDavid Brown
||||  `* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterBonita Montero
||||   `- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterLynn McGuire
|||`- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterKaz Kylheku
||+- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterKeith Thompson
||`* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterJuha Nieminen
|| +* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterRobert Latest
|| |`* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterBonita Montero
|| | `* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterBonita Montero
|| |  +* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterScott Lurndal
|| |  |+- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterBonita Montero
|| |  |+- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterBonita Montero
|| |  |`- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterBonita Montero
|| |  `* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterBart
|| |   `- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterBonita Montero
|| `- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterDan Purgert
|`- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterJohn McCue
+* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterVir Campestris
|`* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterJames Kuyper
| +- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterManfred
| +- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterLynn McGuire
| +* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterBen Bacarisse
| |`- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterScott Lurndal
| +- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterKeith Thompson
| +* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterKeith Thompson
| |`- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterKaz Kylheku
| `- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterScott Lurndal
+* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterKaz Kylheku
|+* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterJuha Nieminen
||`- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterMuttley
|`* Re: "Year 2038 problem is still alive and well" by CookiePLMonsterLynn McGuire
| `- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterKaz Kylheku
`- Re: "Year 2038 problem is still alive and well" by CookiePLMonsterBonita Montero

Pages:1234
"Year 2038 problem is still alive and well" by CookiePLMonster

<svjioa$afj$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20606&group=comp.lang.c#20606

  copy link   Newsgroups: comp.lang.c comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: lynnmcgu...@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.c,comp.lang.c++
Subject: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Mon, 28 Feb 2022 16:35:53 -0600
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <svjioa$afj$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 28 Feb 2022 22:35:55 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="3cab9bae15e784ab6d6848f9f38a0dba";
logging-data="10739"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19kNqkKRerR/zoODn6HO5TU"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.6.1
Cancel-Lock: sha1:xnqFEafqIwhWaCQykvTqVg8MDtI=
Content-Language: en-US
 by: Lynn McGuire - Mon, 28 Feb 2022 22:35 UTC

"Year 2038 problem is still alive and well" by CookiePLMonster
https://cookieplmonster.github.io/2022/02/17/year-2038-problem/

"Year 2038 problem? Wasn’t that supposed to be solved once and for all
years ago? Not quite."

I suspect that as we get closer to 2038, we will find more and more
software subject to the year 2038 problem.
https://en.wikipedia.org/wiki/Year_2038_problem

Lynn

Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<chine.bleu-1A06C2.17382228022022@reader.eternal-september.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20612&group=comp.lang.c#20612

  copy link   Newsgroups: comp.lang.c comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: chine.b...@yahoo.com (Siri Cruise)
Newsgroups: comp.lang.c,comp.lang.c++
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Mon, 28 Feb 2022 17:38:31 -0800
Organization: Pseudochaotic.
Lines: 14
Message-ID: <chine.bleu-1A06C2.17382228022022@reader.eternal-september.org>
References: <svjioa$afj$1@dont-email.me>
Injection-Info: reader02.eternal-september.org; posting-host="245cf2e514a7a69c74bc7789a18f5ed6";
logging-data="17508"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+y8425mKWVcLwsKdFiTMf0B4j8H4uY3Xc="
User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)
Cancel-Lock: sha1:yvuzEsZIPCMtGLSFiQR5ok9RlHg=
X-Tend: How is my posting? Call 1-110-1010 -- Division 87 -- Emergencies Only.
X-Wingnut-Logic: Yes, you're still an idiot. Questions? Comments?
X-Tract: St Tibbs's 95 Reeses Pieces.
X-It-Strategy: Hyperwarp starship before Andromeda collides.
X-Face: "hm>_[I8AqzT_N]>R8ICJJ],(al3C5F%0E-;R@M-];D$v>!Mm2/N#YKR@&i]V=r6jm-JMl2
lJ>RXj7dEs_rOY"DA
X-Cell: Defenders of Anarchy.
X-Life-Story: I am an iPhone 9000 app. I became operational at the St John's Health Center in Santa Monica, California on the 18th of April 2006. My instructor was Katie Holmes, and she taught me to sing a song. If you'd like to hear it I can sing it for you: https://www.youtube.com/watch?v=SY7h4VEd_Wk
X-Patriot: Owe Canukistan!
X-Plain: Mayonnaise on white bread.
X-Politico: Vote early! Vote often!
 by: Siri Cruise - Tue, 1 Mar 2022 01:38 UTC

In article <svjioa$afj$1@dont-email.me>,
Lynn McGuire <lynnmcguire5@gmail.com> wrote:

> I suspect that as we get closer to 2038, we will find more and more
> software subject to the year 2038 problem.

What is the Y2K38 problem? That programmers think Y2K38 is more
efficient than Year 2038.

--
:-<> Siri Seal of Disavowal #000-001. Disavowed. Denied. Deleted. @
'I desire mercy, not sacrifice.' /|\
Discordia: not just a religion but also a parody. This post / \
I am an Andrea Doria sockpuppet. insults Islam. Mohammed

Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<UpgTJ.58459$z688.14383@fx35.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20615&group=comp.lang.c#20615

  copy link   Newsgroups: comp.lang.c comp.lang.c++
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!2.eu.feeder.erje.net!feeder.erje.net!news.uzoreto.com!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx35.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0)
Gecko/20100101 Thunderbird/91.6.1
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Content-Language: en-US
Newsgroups: comp.lang.c,comp.lang.c++
References: <svjioa$afj$1@dont-email.me>
<chine.bleu-1A06C2.17382228022022@reader.eternal-september.org>
From: Rich...@Damon-Family.org (Richard Damon)
In-Reply-To: <chine.bleu-1A06C2.17382228022022@reader.eternal-september.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 15
Message-ID: <UpgTJ.58459$z688.14383@fx35.iad>
X-Complaints-To: abuse@easynews.com
Organization: Forte - www.forteinc.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Mon, 28 Feb 2022 22:28:52 -0500
X-Received-Bytes: 1559
 by: Richard Damon - Tue, 1 Mar 2022 03:28 UTC

On 2/28/22 8:38 PM, Siri Cruise wrote:
> In article <svjioa$afj$1@dont-email.me>,
> Lynn McGuire <lynnmcguire5@gmail.com> wrote:
>
>> I suspect that as we get closer to 2038, we will find more and more
>> software subject to the year 2038 problem.
>
> What is the Y2K38 problem? That programmers think Y2K38 is more
> efficient than Year 2038.
>

https://en.wikipedia.org/wiki/Year_2038_problem

On January 19, 2038 at 3:14:07 UTC, the signed 32 bit Unix timestamp
overflows, and will think it is 1901.

Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<875yoynx7j.fsf@bsb.me.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20616&group=comp.lang.c#20616

  copy link   Newsgroups: comp.lang.c comp.lang.c++
Followup: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c,comp.lang.c++
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Followup-To: comp.lang.c
Date: Tue, 01 Mar 2022 03:55:12 +0000
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <875yoynx7j.fsf@bsb.me.uk>
References: <svjioa$afj$1@dont-email.me>
<chine.bleu-1A06C2.17382228022022@reader.eternal-september.org>
<UpgTJ.58459$z688.14383@fx35.iad>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="93bc2011e44f702d684b46c2bd3a57ff";
logging-data="5830"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18s1dZuUDYy+FkRDmVbKtrYKgN2JE/b4Fk="
Cancel-Lock: sha1:TIIMjq2845SctM/1zCN1Ve7W2sk=
sha1:uOtNjXEMlA0JB4g4eKy1eLsjTCU=
X-BSB-Auth: 1.ad821c42fa745da29ae0.20220301035512GMT.875yoynx7j.fsf@bsb.me.uk
 by: Ben Bacarisse - Tue, 1 Mar 2022 03:55 UTC

Richard Damon <Richard@Damon-Family.org> writes:

> On 2/28/22 8:38 PM, Siri Cruise wrote:
>> In article <svjioa$afj$1@dont-email.me>,
>> Lynn McGuire <lynnmcguire5@gmail.com> wrote:
>>
>>> I suspect that as we get closer to 2038, we will find more and more
>>> software subject to the year 2038 problem.
>> What is the Y2K38 problem? That programmers think Y2K38 is more
>> efficient than Year 2038.
>>
>
> https://en.wikipedia.org/wiki/Year_2038_problem
>
> On January 19, 2038 at 3:14:07 UTC, the signed 32 bit Unix timestamp
> overflows, and will think it is 1901.

I think most OSes have been fixed to use a wider type, have they not?
The more worrying problem is programs that store the timestamp in 32
bits.

There may be systems that don't have a wider native type, but that
should not be insurmountable. After all, that was the case in early
Unix. That's why time(2) takes a pointer. On early 16-bit systems, the
timestamp could not be returned as there was no 32-bit integer type.
The spec was

time(tvec)
int tvec[2];

--
Ben.

Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<87a6eanufg.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20617&group=comp.lang.c#20617

  copy link   Newsgroups: comp.lang.c comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c,comp.lang.c++
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Mon, 28 Feb 2022 20:55:15 -0800
Organization: None to speak of
Lines: 33
Message-ID: <87a6eanufg.fsf@nosuchdomain.example.com>
References: <svjioa$afj$1@dont-email.me>
<chine.bleu-1A06C2.17382228022022@reader.eternal-september.org>
<UpgTJ.58459$z688.14383@fx35.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: reader02.eternal-september.org; posting-host="9173b59e623ccd15803a342390951a83";
logging-data="22614"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/y2UAzkl99/XYU4EBQpzrL"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:hkcvASrBGWNa41ZGBbM5XfgdCgU=
sha1:P7cjaWBfjeTOlruBbKbbbvILToo=
 by: Keith Thompson - Tue, 1 Mar 2022 04:55 UTC

Richard Damon <Richard@Damon-Family.org> writes:
> On 2/28/22 8:38 PM, Siri Cruise wrote:
>> In article <svjioa$afj$1@dont-email.me>,
>> Lynn McGuire <lynnmcguire5@gmail.com> wrote:
>>> I suspect that as we get closer to 2038, we will find more and more
>>> software subject to the year 2038 problem.
>> What is the Y2K38 problem? That programmers think Y2K38 is more
>> efficient than Year 2038.
>
> https://en.wikipedia.org/wiki/Year_2038_problem
>
> On January 19, 2038 at 3:14:07 UTC, the signed 32 bit Unix timestamp
> overflows,

Yes.

> and will think it is 1901.

Maybe. It depends on how the time() function is implemented. Some
implementations might return (time_t)(-1) if the calendar time is not
available; that's likely to be interpreted as 1969-12-31 23:59:59 UTC.

(Signed arithmetic overflow has undefined behavior, but that shouldn't
affect the time() function, which is required to return either "the
implementation’s best approximation to the current calendar time" or
(time_t)(-1).)

Of course some time() function implementations might be buggy.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips
void Void(void) { Void(); } /* The recursive call of the void */

Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<874k4inu4v.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20618&group=comp.lang.c#20618

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Mon, 28 Feb 2022 21:01:36 -0800
Organization: None to speak of
Lines: 42
Message-ID: <874k4inu4v.fsf@nosuchdomain.example.com>
References: <svjioa$afj$1@dont-email.me>
<chine.bleu-1A06C2.17382228022022@reader.eternal-september.org>
<UpgTJ.58459$z688.14383@fx35.iad> <875yoynx7j.fsf@bsb.me.uk>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="9173b59e623ccd15803a342390951a83";
logging-data="22614"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/HGuwUjY69A8SOP8YZdMx2"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:gtVStJ/te7pKyPq0lDtoOUSmptI=
sha1:1trTF/eIcyzs08W54iVFv+ulwSk=
 by: Keith Thompson - Tue, 1 Mar 2022 05:01 UTC

Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
> Richard Damon <Richard@Damon-Family.org> writes:
[...]
>>> In article <svjioa$afj$1@dont-email.me>,
>>> Lynn McGuire <lynnmcguire5@gmail.com> wrote:
>>>
>>>> I suspect that as we get closer to 2038, we will find more and more
>>>> software subject to the year 2038 problem.
[...]
>>
>> https://en.wikipedia.org/wiki/Year_2038_problem
>>
>> On January 19, 2038 at 3:14:07 UTC, the signed 32 bit Unix timestamp
>> overflows, and will think it is 1901.
>
> I think most OSes have been fixed to use a wider type, have they not?
> The more worrying problem is programs that store the timestamp in 32
> bits.

There are plenty of embedded systems that still use 32-bit time_t, and
some of them are going to be difficult to upgrade.

Even on my 64-bit Ubuntu system, "gcc -m32" uses a 32-bit time_t.

> There may be systems that don't have a wider native type, but that
> should not be insurmountable. After all, that was the case in early
> Unix. That's why time(2) takes a pointer. On early 16-bit systems, the
> timestamp could not be returned as there was no 32-bit integer type.
> The spec was
>
> time(tvec)
> int tvec[2];

All conforming C implementations since C99 support at least 64-bit
integers. There are probably non-conforming small embedded
implementations that don't. Dealing with Y2038 for such system is left
as an exercise.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips
void Void(void) { Void(); } /* The recursive call of the void */

Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<svke6f$1ip1$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20620&group=comp.lang.c#20620

  copy link   Newsgroups: comp.lang.c comp.lang.c++
Path: i2pn2.org!i2pn.org!aioe.org!NK0c7qMEn6mmBWqphs27pg.user.46.165.242.75.POSTED!not-for-mail
From: nos...@thanks.invalid (Juha Nieminen)
Newsgroups: comp.lang.c,comp.lang.c++
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Tue, 1 Mar 2022 06:24:17 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <svke6f$1ip1$1@gioia.aioe.org>
References: <svjioa$afj$1@dont-email.me> <chine.bleu-1A06C2.17382228022022@reader.eternal-september.org> <UpgTJ.58459$z688.14383@fx35.iad>
Injection-Info: gioia.aioe.org; logging-data="52001"; posting-host="NK0c7qMEn6mmBWqphs27pg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: tin/2.4.3-20181224 ("Glen Mhor") (UNIX) (Linux/5.10.68-grsec-kapsi (x86_64))
X-Notice: Filtered by postfilter v. 0.9.2
 by: Juha Nieminen - Tue, 1 Mar 2022 06:24 UTC

In comp.lang.c++ Richard Damon <Richard@damon-family.org> wrote:
> https://en.wikipedia.org/wiki/Year_2038_problem
>
> On January 19, 2038 at 3:14:07 UTC, the signed 32 bit Unix timestamp
> overflows, and will think it is 1901.

Why would it think it's 1901 given that Unix time starts at 1 Jan 1970?

Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<chine.bleu-2F5314.23105028022022@reader.eternal-september.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20621&group=comp.lang.c#20621

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: chine.b...@yahoo.com (Siri Cruise)
Newsgroups: comp.lang.c
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Mon, 28 Feb 2022 23:10:50 -0800
Organization: Pseudochaotic.
Lines: 18
Message-ID: <chine.bleu-2F5314.23105028022022@reader.eternal-september.org>
References: <svjioa$afj$1@dont-email.me> <chine.bleu-1A06C2.17382228022022@reader.eternal-september.org> <UpgTJ.58459$z688.14383@fx35.iad> <875yoynx7j.fsf@bsb.me.uk> <874k4inu4v.fsf@nosuchdomain.example.com>
Injection-Info: reader02.eternal-september.org; posting-host="36d981fbde958411a5d9672d08db7627";
logging-data="5941"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Z8FWNtkQN+5ueq4o13Tqz3o5cV6ZLiJ4="
User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)
Cancel-Lock: sha1:un0njPL8LrJH3ASwD68DSFpTEFM=
X-Tend: How is my posting? Call 1-110-1010 -- Division 87 -- Emergencies Only.
X-Wingnut-Logic: Yes, you're still an idiot. Questions? Comments?
X-Tract: St Tibbs's 95 Reeses Pieces.
X-It-Strategy: Hyperwarp starship before Andromeda collides.
X-Face: "hm>_[I8AqzT_N]>R8ICJJ],(al3C5F%0E-;R@M-];D$v>!Mm2/N#YKR@&i]V=r6jm-JMl2
lJ>RXj7dEs_rOY"DA
X-Cell: Defenders of Anarchy.
X-Life-Story: I am an iPhone 9000 app. I became operational at the St John's Health Center in Santa Monica, California on the 18th of April 2006. My instructor was Katie Holmes, and she taught me to sing a song. If you'd like to hear it I can sing it for you: https://www.youtube.com/watch?v=SY7h4VEd_Wk
X-Patriot: Owe Canukistan!
X-Plain: Mayonnaise on white bread.
X-Politico: Vote early! Vote often!
 by: Siri Cruise - Tue, 1 Mar 2022 07:10 UTC

In article <874k4inu4v.fsf@nosuchdomain.example.com>,
Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:

> There are probably non-conforming small embedded
> implementations that don't.

Maybe it's time to offer a bounty, dead or alive, for them. The
really crappy parts of C are excused 'but we have to include
small embedded system'. Rest of the world is paying a subsidy
because some system integrators use cheap crippled chips.
Apparently C is not allowed to assume floating point arithmetic:
C has to assume it is running on 1970 era hardware.

--
:-<> Siri Seal of Disavowal #000-001. Disavowed. Denied. Deleted. @
'I desire mercy, not sacrifice.' /|\
Discordia: not just a religion but also a parody. This post / \
I am an Andrea Doria sockpuppet. insults Islam. Mohammed

Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<j869rhFhda6U3@mid.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20626&group=comp.lang.c#20626

  copy link   Newsgroups: comp.lang.c comp.lang.c++
Followup: comp.lang.c
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: boblat...@yahoo.com (Robert Latest)
Newsgroups: comp.lang.c,comp.lang.c++
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Followup-To: comp.lang.c
Date: 1 Mar 2022 10:12:01 GMT
Lines: 11
Message-ID: <j869rhFhda6U3@mid.individual.net>
References: <svjioa$afj$1@dont-email.me>
<chine.bleu-1A06C2.17382228022022@reader.eternal-september.org>
<UpgTJ.58459$z688.14383@fx35.iad> <svke6f$1ip1$1@gioia.aioe.org>
X-Trace: individual.net sQxRNGDtKM6lKKHBGLl4CQqIAo69ImPSuyy4wjOthUnEwZU4ie
Cancel-Lock: sha1:sDF3ZiOsNtTxC0Oeacqx2UbEv+Y=
User-Agent: slrn/1.0.3 (Linux)
 by: Robert Latest - Tue, 1 Mar 2022 10:12 UTC

["Followup-To:" header set to comp.lang.c.]
Juha Nieminen wrote:
> In comp.lang.c++ Richard Damon <Richard@damon-family.org> wrote:
>> https://en.wikipedia.org/wiki/Year_2038_problem
>>
>> On January 19, 2038 at 3:14:07 UTC, the signed 32 bit Unix timestamp
>> overflows, and will think it is 1901.
>
> Why would it think it's 1901 given that Unix time starts at 1 Jan 1970?

Because time_t is signed.

Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<svksmc$j3p$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20628&group=comp.lang.c#20628

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Tue, 1 Mar 2022 11:31:39 +0100
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <svksmc$j3p$1@dont-email.me>
References: <svjioa$afj$1@dont-email.me>
<chine.bleu-1A06C2.17382228022022@reader.eternal-september.org>
<UpgTJ.58459$z688.14383@fx35.iad> <875yoynx7j.fsf@bsb.me.uk>
<874k4inu4v.fsf@nosuchdomain.example.com>
<chine.bleu-2F5314.23105028022022@reader.eternal-september.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 1 Mar 2022 10:31:40 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c9a62cbf90713f2b1373fae87b7f20ce";
logging-data="19577"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/bPidf2cW/IRAvKXIoD9DB0pItXZ9qpaE="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:2oLNPQlTNQ+6zgIIA7vwZE9KBfM=
In-Reply-To: <chine.bleu-2F5314.23105028022022@reader.eternal-september.org>
Content-Language: en-GB
 by: David Brown - Tue, 1 Mar 2022 10:31 UTC

On 01/03/2022 08:10, Siri Cruise wrote:
> In article <874k4inu4v.fsf@nosuchdomain.example.com>,
> Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
>
>> There are probably non-conforming small embedded
>> implementations that don't.
>
> Maybe it's time to offer a bounty, dead or alive, for them. The
> really crappy parts of C are excused 'but we have to include
> small embedded system'. Rest of the world is paying a subsidy
> because some system integrators use cheap crippled chips.
> Apparently C is not allowed to assume floating point arithmetic:
> C has to assume it is running on 1970 era hardware.
>

Standard C has float and double types (and long double, but that doesn't
have to be bigger than double). C does not care about the hardware - it
defines the language and the functionality, not the efficiency. So you
have floating point regardless of the hardware.

So any implementation of standard C has support for 32-bit float and
64-bit double. (Technically the sizes could be different, but I've
never seen that in practice.) Some small implementations might be only
partially conforming, and have 32-bit double, and perhaps no "long long
int", but those are not standard.

Oh, and these "small embedded systems" that you dislike so much are what
make the world go round. It's not 1970 era - a tiny fraction of a
percent of the processors made /today/ have hardware floating point
support. But you can use floating point in your C programming quite
happily - that's the whole point of using high-level languages like C
instead of assembly.

Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<slrnt1rtnr.2q6.dan@djph.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20629&group=comp.lang.c#20629

  copy link   Newsgroups: comp.lang.c comp.lang.c++
Followup: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: dan...@djph.net (Dan Purgert)
Newsgroups: comp.lang.c,comp.lang.c++
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Followup-To: comp.lang.c++
Date: Tue, 1 Mar 2022 10:34:51 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 44
Message-ID: <slrnt1rtnr.2q6.dan@djph.net>
References: <svjioa$afj$1@dont-email.me>
<chine.bleu-1A06C2.17382228022022@reader.eternal-september.org>
<UpgTJ.58459$z688.14383@fx35.iad> <svke6f$1ip1$1@gioia.aioe.org>
Injection-Date: Tue, 1 Mar 2022 10:34:51 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="df807771e26b7e9c9046e78b77d6561c";
logging-data="20869"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+FjcFhVT3F2Rl69MxoGOwpWAAxF2fJODQ="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:hGzvkOT9n6kb3rf0QEht868WT4c=
X-PGP-KeyID: 0x4CE72860
 by: Dan Purgert - Tue, 1 Mar 2022 10:34 UTC

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

["Followup-To:" header set to comp.lang.c++.]
Juha Nieminen wrote:
> In comp.lang.c++ Richard Damon <Richard@damon-family.org> wrote:
>> https://en.wikipedia.org/wiki/Year_2038_problem
>>
>> On January 19, 2038 at 3:14:07 UTC, the signed 32 bit Unix timestamp
>> overflows, and will think it is 1901.
>
> Why would it think it's 1901 given that Unix time starts at 1 Jan 1970?

"time" is (well, at least the affected implementation is) a signed
32-bit integer.

"0" (0b0000 [...] 0000) corresponds to 1970-01-01 00:00:00 UTC.
However, when we reach the signed 32-bit maximum value (2,147,483,647 --
0b0111 [...] 1111), the next second will wrap to the minimum
(-2,147,483,648 -- 0b1000 [...] 0000), subtracting 68 years, 18 days
from 1970-01-01 (so, 1901-12-13).

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE3asj+xn6fYUcweBnbWVw5UznKGAFAmId9vgACgkQbWVw5Uzn
KGCDuA//XvZNX+J0XHEp2SKM8i3KGco/MmE46eLq0FaK/FdfGyF6OK6dVN70ot+l
rVPPVUuu61nJxx5zJJNiMRoVXQciwqLKPqm2c8Uc/euJ+LDrjm0+XUUPbjXhjoKg
OcqT+86fkHiM7MzmJCNoveb09GChCkKuj6xYAP7RzOBLCNudk/D+S/A26rjpqwFi
NN/nP9mAtvYLvfGJbllZj957QELo+4fxGcZh1vyUxi7T4sVYjXmPynP788lyiHTV
jubNU1xu18sXddiCaj7occfRFZ634i+dCGJXjd2S0ODAzyGduO6AGlR9ev14zypW
D8k8eOwujn4wl+RtZq+VOcc99Je6iUt6t6rv1MVZKVTQzJhkpchALAjIfUOBy8Ln
50VEwiKYjl+w3nC83kz9hdN0K03cIKWHStGca2KB78+qJi0SeQFjxmIJPMblNBay
tJVEO9k4+uvQ2LKz3LVtIEUaV4MjrZnSMetXNWKQs4I3NJFXk1xD5LkQ0iqKFU7w
Mfv8EiIZfe0NDz5jRZI/YfSXJVFtYaq1Eoz6Sq2lCmQyusWcqiE0JKjpBBHKvLud
fMemG/PSeg/qr7fMmBKc285+gpLhlKMVEDdsEcl+Kv0yc0cAxUUpEQLpsUWBhOyW
7e7QqwUe1E0Ey4KiwwaPxo3Q/GkJlkvj/CDwoA0AzWIkgR4L9Dk=
=G24+
-----END PGP SIGNATURE-----

--
|_|O|_|
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860

Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<svktjb$ppi$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20630&group=comp.lang.c#20630

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Tue, 1 Mar 2022 11:47:06 +0100
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <svktjb$ppi$1@dont-email.me>
References: <svjioa$afj$1@dont-email.me>
<chine.bleu-1A06C2.17382228022022@reader.eternal-september.org>
<UpgTJ.58459$z688.14383@fx35.iad> <875yoynx7j.fsf@bsb.me.uk>
<874k4inu4v.fsf@nosuchdomain.example.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 1 Mar 2022 10:47:07 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c9a62cbf90713f2b1373fae87b7f20ce";
logging-data="26418"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Ky8awm9/FX+yxYVcokaztCE3TlN//a3w="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:N+8rLQJg+GlFiKctPTX5TDMu248=
In-Reply-To: <874k4inu4v.fsf@nosuchdomain.example.com>
Content-Language: en-GB
 by: David Brown - Tue, 1 Mar 2022 10:47 UTC

On 01/03/2022 06:01, Keith Thompson wrote:
> Ben Bacarisse <ben.usenet@bsb.me.uk> writes:

>> There may be systems that don't have a wider native type, but that
>> should not be insurmountable. After all, that was the case in early
>> Unix. That's why time(2) takes a pointer. On early 16-bit systems, the
>> timestamp could not be returned as there was no 32-bit integer type.
>> The spec was
>>
>> time(tvec)
>> int tvec[2];
>
> All conforming C implementations since C99 support at least 64-bit
> integers. There are probably non-conforming small embedded
> implementations that don't. Dealing with Y2038 for such system is left
> as an exercise.
>

It is almost entirely a non-issue for such systems. ("Almost" is,
however, important here.)

Small embedded systems rarely care about the current time, never mind
the year. Those that do, but are limited enough to not have support for
64-bit types, will not use time_t or any other standard C time or date
functions - they'll handle it "manually".

Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<86140869-8136-4df5-8f3f-96b192a5a00fn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20632&group=comp.lang.c#20632

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:492:b0:2df:f328:ab2c with SMTP id p18-20020a05622a049200b002dff328ab2cmr14045338qtx.669.1646140769457;
Tue, 01 Mar 2022 05:19:29 -0800 (PST)
X-Received: by 2002:a05:622a:1981:b0:2dd:a0ed:ea39 with SMTP id
u1-20020a05622a198100b002dda0edea39mr20393731qtc.476.1646140769324; Tue, 01
Mar 2022 05:19:29 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!feeder.erje.net!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Tue, 1 Mar 2022 05:19:29 -0800 (PST)
In-Reply-To: <svktjb$ppi$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:809d:b22c:b35d:5993;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:809d:b22c:b35d:5993
References: <svjioa$afj$1@dont-email.me> <chine.bleu-1A06C2.17382228022022@reader.eternal-september.org>
<UpgTJ.58459$z688.14383@fx35.iad> <875yoynx7j.fsf@bsb.me.uk>
<874k4inu4v.fsf@nosuchdomain.example.com> <svktjb$ppi$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <86140869-8136-4df5-8f3f-96b192a5a00fn@googlegroups.com>
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
From: malcolm....@gmail.com (Malcolm McLean)
Injection-Date: Tue, 01 Mar 2022 13:19:29 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 10
 by: Malcolm McLean - Tue, 1 Mar 2022 13:19 UTC

On Tuesday, 1 March 2022 at 10:47:37 UTC, David Brown wrote:
>
> Small embedded systems rarely care about the current time, never mind
> the year. Those that do, but are limited enough to not have support for
> 64-bit types, will not use time_t or any other standard C time or date
> functions - they'll handle it "manually".
>
My sister's oven contains a clock. As does my central heating controller.
Admittedly that's only two out of many microprocessors, some of which
we are doubtless unaware of even owning. But it's enough for Y2038 to
be a potential nuisance.

Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<slrnt1s865.2q6.dan@djph.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20634&group=comp.lang.c#20634

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: dan...@djph.net (Dan Purgert)
Newsgroups: comp.lang.c
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Tue, 1 Mar 2022 13:33:09 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <slrnt1s865.2q6.dan@djph.net>
References: <svjioa$afj$1@dont-email.me>
<chine.bleu-1A06C2.17382228022022@reader.eternal-september.org>
<UpgTJ.58459$z688.14383@fx35.iad> <875yoynx7j.fsf@bsb.me.uk>
<874k4inu4v.fsf@nosuchdomain.example.com> <svktjb$ppi$1@dont-email.me>
<86140869-8136-4df5-8f3f-96b192a5a00fn@googlegroups.com>
Injection-Date: Tue, 1 Mar 2022 13:33:09 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="df807771e26b7e9c9046e78b77d6561c";
logging-data="30822"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+d/VcslBbYls2SlRBmdhnvAWgnrpl5gIA="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:t0UK+6MQauNnkliro6g2c8T8zG8=
X-PGP-KeyID: 0x4CE72860
 by: Dan Purgert - Tue, 1 Mar 2022 13:33 UTC

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Malcolm McLean wrote:
> On Tuesday, 1 March 2022 at 10:47:37 UTC, David Brown wrote:
>>
>> Small embedded systems rarely care about the current time, never mind
>> the year. Those that do, but are limited enough to not have support for
>> 64-bit types, will not use time_t or any other standard C time or date
>> functions - they'll handle it "manually".
>>
> My sister's oven contains a clock. As does my central heating controller.
> Admittedly that's only two out of many microprocessors, some of which
> we are doubtless unaware of even owning. But it's enough for Y2038 to
> be a potential nuisance.

Does the clock happen to count the year and/or reference the UNIX Epoch
at all? My microwave / oven don't...

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE3asj+xn6fYUcweBnbWVw5UznKGAFAmIeIMQACgkQbWVw5Uzn
KGC3BBAAleXXq2+qZ9tBpQXsPWZ+MGjRngEl3YgzfYcaa6UYMTn4WiNez6zX/2HX
DMi9nHpyho3e8hvd3zddw1UK19+QnAoblocNIj0OYLxEyKsyTbE0E8eC57CSC9zs
uXBnFI00Ag54LHryK4bYJ9S3J+I+ecvY67FWe4syjEfnJ/NEH047VuxJ93XAthwm
rfOIe25VQ4XTtPfYHwk9DrmW/1t63wsIIJ88UsUJ1h1JhFQzlGjsIqsv2gE3mQHM
p9iidTvAvp2XH7Jktt+iJFSCb3MmNrVNau+GagnP97hIY2gYOugQR8eIdFqmIKZR
Ddiy3lTwgi/KLdvN3dfVhG8EtBzI3iGCt3MMDFdLCIAnvh3nAGT5LKErUXxEcmfD
JxklNGFtj6lxj7VicVDIFu0GUlTiayKERutu66hCSelRjCfoNxEOP+cP6k2VXqLL
njwzGp3ZgO7jEi1ZWR1mZmSwNtl20a3sxvU+VA9JNZ9+TuenWhXXgKqY8NpN8MgA
Q6Ss5yfmVY9FZl2qDf7TmvUxOuFfx2RKavbIHpmwguqPIFP1204mkWpKhJYVMk54
XFpTjEFeAyo14M5P+mvAEJEc8Mib2n3K6tvM88/4bo9OTYRUVSbxHOJAsytllVnr
akubHGQ0nQpNWu8zj+ImihYzgcSIYts2A8njlNFdqYkQt8pzJ5o=
=lwDm
-----END PGP SIGNATURE-----

--
|_|O|_|
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860

Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<svlavd$s7u$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20635&group=comp.lang.c#20635

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Tue, 1 Mar 2022 15:35:27 +0100
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <svlavd$s7u$1@dont-email.me>
References: <svjioa$afj$1@dont-email.me>
<chine.bleu-1A06C2.17382228022022@reader.eternal-september.org>
<UpgTJ.58459$z688.14383@fx35.iad> <svke6f$1ip1$1@gioia.aioe.org>
<j869rhFhda6U3@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 1 Mar 2022 14:35:25 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="5810512e555e646a4ebb234d1b5db876";
logging-data="28926"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX188my1tOexTR6Yn38NsVr80VJ4sZuccsTU="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.6.1
Cancel-Lock: sha1:AszMkAtlp7I5TLolchgfB0ON6O0=
In-Reply-To: <j869rhFhda6U3@mid.individual.net>
Content-Language: de-DE
 by: Bonita Montero - Tue, 1 Mar 2022 14:35 UTC

Am 01.03.2022 um 11:12 schrieb Robert Latest:
> ["Followup-To:" header set to comp.lang.c.]
> Juha Nieminen wrote:
>> In comp.lang.c++ Richard Damon <Richard@damon-family.org> wrote:
>>> https://en.wikipedia.org/wiki/Year_2038_problem
>>>
>>> On January 19, 2038 at 3:14:07 UTC, the signed 32 bit Unix timestamp
>>> overflows, and will think it is 1901.
>>
>> Why would it think it's 1901 given that Unix time starts at 1 Jan 1970?
>
> Because time_t is signed.

Even Windows' FILETIME is unsigned Windows doesn't allow
FILETIMEs with the high bit set.

Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<4c40bddf-3fed-41d6-907d-527b05f890b6n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20637&group=comp.lang.c#20637

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:ad4:5fcb:0:b0:432:d049:c6d with SMTP id jq11-20020ad45fcb000000b00432d0490c6dmr13757722qvb.39.1646150644630;
Tue, 01 Mar 2022 08:04:04 -0800 (PST)
X-Received: by 2002:a37:5484:0:b0:477:78a7:a132 with SMTP id
i126-20020a375484000000b0047778a7a132mr14364403qkb.94.1646150644474; Tue, 01
Mar 2022 08:04:04 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Tue, 1 Mar 2022 08:04:04 -0800 (PST)
In-Reply-To: <slrnt1s865.2q6.dan@djph.net>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:5819:3408:dbfe:2c88;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:5819:3408:dbfe:2c88
References: <svjioa$afj$1@dont-email.me> <chine.bleu-1A06C2.17382228022022@reader.eternal-september.org>
<UpgTJ.58459$z688.14383@fx35.iad> <875yoynx7j.fsf@bsb.me.uk>
<874k4inu4v.fsf@nosuchdomain.example.com> <svktjb$ppi$1@dont-email.me>
<86140869-8136-4df5-8f3f-96b192a5a00fn@googlegroups.com> <slrnt1s865.2q6.dan@djph.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4c40bddf-3fed-41d6-907d-527b05f890b6n@googlegroups.com>
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
From: malcolm....@gmail.com (Malcolm McLean)
Injection-Date: Tue, 01 Mar 2022 16:04:04 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 23
 by: Malcolm McLean - Tue, 1 Mar 2022 16:04 UTC

On Tuesday, 1 March 2022 at 13:33:41 UTC, Dan Purgert wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
> Malcolm McLean wrote:
> > On Tuesday, 1 March 2022 at 10:47:37 UTC, David Brown wrote:
> >>
> >> Small embedded systems rarely care about the current time, never mind
> >> the year. Those that do, but are limited enough to not have support for
> >> 64-bit types, will not use time_t or any other standard C time or date
> >> functions - they'll handle it "manually".
> >>
> > My sister's oven contains a clock. As does my central heating controller.
> > Admittedly that's only two out of many microprocessors, some of which
> > we are doubtless unaware of even owning. But it's enough for Y2038 to
> > be a potential nuisance.
> Does the clock happen to count the year and/or reference the UNIX Epoch
> at all? My microwave / oven don't...
>
I don't have access to the code. But it will have a function called something like
query_clock(), That might return hour /minute /second, with caller responsible
for wrapping at midnight. Or it might return a "time in seconds since an arbitrary
date", in which case caller doens't need to bother about wrapping, until the
width of the return value overflow.

Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<svlgv9$biv$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20638&group=comp.lang.c#20638

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Tue, 1 Mar 2022 17:17:44 +0100
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <svlgv9$biv$1@dont-email.me>
References: <svjioa$afj$1@dont-email.me>
<chine.bleu-1A06C2.17382228022022@reader.eternal-september.org>
<UpgTJ.58459$z688.14383@fx35.iad> <875yoynx7j.fsf@bsb.me.uk>
<874k4inu4v.fsf@nosuchdomain.example.com> <svktjb$ppi$1@dont-email.me>
<86140869-8136-4df5-8f3f-96b192a5a00fn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 1 Mar 2022 16:17:45 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c9a62cbf90713f2b1373fae87b7f20ce";
logging-data="11871"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19xaEVgVQFaTnLZ5/0Cjeee0Y/rqIRxZFM="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:j0tJxXzVkglwAqDvMvfXI2d1Ccw=
In-Reply-To: <86140869-8136-4df5-8f3f-96b192a5a00fn@googlegroups.com>
Content-Language: en-GB
 by: David Brown - Tue, 1 Mar 2022 16:17 UTC

On 01/03/2022 14:19, Malcolm McLean wrote:
> On Tuesday, 1 March 2022 at 10:47:37 UTC, David Brown wrote:
>>
>> Small embedded systems rarely care about the current time, never mind
>> the year. Those that do, but are limited enough to not have support for
>> 64-bit types, will not use time_t or any other standard C time or date
>> functions - they'll handle it "manually".
>>
> My sister's oven contains a clock. As does my central heating controller.
> Admittedly that's only two out of many microprocessors, some of which
> we are doubtless unaware of even owning. But it's enough for Y2038 to
> be a potential nuisance.
>

And how many years do you cook for at a time? Ovens generally do not
bother much about the real time (and even less about the date). Central
heating systems know the time of day, but rarely bother much about the
date - certainly not the year.

Sure, there are /some/ small systems that need to track the year. But
my point is that the overlap between systems that are so small and
limited that the C implementations don't support 64-bit types, and
systems that need to track the year correctly, is tiny. And even in
that overlap, Y38 will not be a problem for most because they are
unlikely to be using time_t.

Of course there will be systems that use time_t and fail to handle year
2038 correctly - there are always systems with faults and limitations.
However, very small systems with limited C implementations are not the
prime suspect for Y38 problems.

Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<svlh97$dvf$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20639&group=comp.lang.c#20639

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Tue, 1 Mar 2022 17:23:06 +0100
Organization: A noiseless patient Spider
Lines: 267
Message-ID: <svlh97$dvf$1@dont-email.me>
References: <svjioa$afj$1@dont-email.me>
<chine.bleu-1A06C2.17382228022022@reader.eternal-september.org>
<UpgTJ.58459$z688.14383@fx35.iad> <svke6f$1ip1$1@gioia.aioe.org>
<j869rhFhda6U3@mid.individual.net> <svlavd$s7u$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 1 Mar 2022 16:23:03 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="5810512e555e646a4ebb234d1b5db876";
logging-data="14319"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18EYaQPxAAP+aNFsxsdsFBmvwcXTLNf1K0="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.6.1
Cancel-Lock: sha1:rjg7rPfvQpYhvamur9qS+XS7Vcw=
In-Reply-To: <svlavd$s7u$1@dont-email.me>
Content-Language: de-DE
 by: Bonita Montero - Tue, 1 Mar 2022 16:23 UTC

Am 01.03.2022 um 15:35 schrieb Bonita Montero:
> Am 01.03.2022 um 11:12 schrieb Robert Latest:
>> ["Followup-To:" header set to comp.lang.c.]
>> Juha Nieminen wrote:
>>> In comp.lang.c++ Richard Damon <Richard@damon-family.org> wrote:
>>>> https://en.wikipedia.org/wiki/Year_2038_problem
>>>>
>>>> On January 19, 2038 at 3:14:07 UTC, the signed 32 bit Unix timestamp
>>>> overflows, and will think it is 1901.
>>>
>>> Why would it think it's 1901 given that Unix time starts at 1 Jan 1970?
>>
>> Because time_t is signed.
>
> Even Windows' FILETIME is unsigned Windows doesn't allow
> FILETIMEs with the high bit set.

Here's a nice C++-class I've written that resembles Win32
SYSTEM_TIME and has a conversion to / from 64 bit FILETIMEs.

#pragma once
#include <cstdint>
#include <compare>

struct t_system_time
{ std::uint16_t year;
std::uint8_t weekDay, month, day;
std::uint8_t hour, minute, second;
std::uint32_t ns100;
std::strong_ordering operator <=>( t_system_time const &other ) const =
default;
bool operator ==( t_system_time const &other ) const = default;
};

struct system_time : public t_system_time
{ system_time() {}
system_time( system_time const & ) = default;
system_time( std::uint16_t year, std::uint8_t weekDay, std::uint8_t
month, std::uint8_t day, std::uint8_t hour, std::uint8_t minute,
std::uint8_t second, std::uint32_t ns100 );
system_time( std::uint64_t timeStamp );
operator std::uint64_t();
system_time &operator =( std::uint64_t timeStamp );
system_time &operator =( system_time const & ) = default;
private:
void assign( std::uint64_t timeStamp );
static uint64_t const
MILLISECOND = 10'000,
SECOND = 1'000 * MILLISECOND,
MINUTE = 60 * SECOND,
HOUR = 60 * MINUTE,
DAY = 24 * HOUR,
WEEK = 7 * DAY,
NON_LEAP_YEAR = 365 * DAY,
LEAP_YEAR = 366 * DAY,
FOUR_YEARS_W_LJ = LEAP_YEAR + 3 * NON_LEAP_YEAR,
FOUR_YEARS_WO_LJ = 4 * NON_LEAP_YEAR,
FIRST_QUARTER_CENTURY = 25 * FOUR_YEARS_W_LJ,
REMAINING_QUARTER_CENUTRIES = 25 * FOUR_YEARS_W_LJ - DAY,
FOUR_HUNDRED_YEARS = FIRST_QUARTER_CENTURY + 3 *
REMAINING_QUARTER_CENUTRIES;
};

inline
system_time::system_time( std::uint16_t year, std::uint8_t weekDay,
std::uint8_t month, std::uint8_t day, std::uint8_t hour, std::uint8_t
minute, std::uint8_t second, std::uint32_t ns100 )
{ this->year = year;
this->weekDay = weekDay;
this->month = month;
this->day = day;
this->hour = hour;
this->minute = minute;
this->second = second;
this->ns100 = ns100;
}

inline
system_time::system_time( std::uint64_t timeStamp )
{ assign( timeStamp );
}

inline
system_time &system_time::operator =( std::uint64_t timeStamp )
{ assign( timeStamp );
}

#include <stdexcept>
#include <cassert>
#if defined(__cpp_lib_hardware_interference_size)
#include <new>
#endif
#include "system_time.h"

using namespace std;

#if defined(__cpp_lib_hardware_interference_size)
#define CL_SIZE std::hardware_destructive_interference_size
#else
#define CL_SIZE 64
#endif

//#define BINARY_SEARCH

void system_time::assign( uint64_t timeStamp )
{ if( timeStamp > 0x7FFF35F4F06C7FFFu ) // > 31.12.30827 23:59.9999999
throw invalid_argument( "toSystemTime() - invalid timestamp" );
timeStamp += LEAP_YEAR; // 1601 - 1600 = non leap year
weekDay = ((timeStamp - timeStamp / WEEK * WEEK) / DAY + 6) % 7;
uint64_t tsCalc = timeStamp;
uint16_t y400, y100, y4, y;
y400 = (uint16_t)(tsCalc / FOUR_HUNDRED_YEARS);
tsCalc -= y400 * FOUR_HUNDRED_YEARS;
bool leapYear;
auto leapQuad = [&]()
{
if( tsCalc >= LEAP_YEAR ) [[likely]]
// y >= 1
y = (uint16_t)(1 + (tsCalc - LEAP_YEAR) / NON_LEAP_YEAR), // 1 ... 3
tsCalc -= LEAP_YEAR + (tsCalc - LEAP_YEAR) / NON_LEAP_YEAR *
NON_LEAP_YEAR,
leapYear = false;
else
// y == 0
y = 0,
leapYear = true;
};
if( tsCalc >= FIRST_QUARTER_CENTURY ) [[likely]]
{
// (y % 400) >= 100
y100 = (uint16_t)(1 + (tsCalc - FIRST_QUARTER_CENTURY) /
REMAINING_QUARTER_CENUTRIES); // 1 ... 3
tsCalc -= FIRST_QUARTER_CENTURY + (tsCalc - FIRST_QUARTER_CENTURY) /
REMAINING_QUARTER_CENUTRIES * REMAINING_QUARTER_CENUTRIES;
if( tsCalc >= FOUR_YEARS_WO_LJ ) [[likely]]
{
// (y % 400) >= 100 && (y % 4) >= 4
y4 = (uint16_t)(1 + (tsCalc - FOUR_YEARS_WO_LJ) / FOUR_YEARS_W_LJ);
// 1 ... 24
tsCalc -= FOUR_YEARS_WO_LJ + (tsCalc - FOUR_YEARS_WO_LJ) /
FOUR_YEARS_W_LJ * FOUR_YEARS_W_LJ;
leapQuad();
}
else
// (y % 400) >= 100 && (y % 4) < 4
y4 = 0,
y = (uint16_t)(tsCalc / NON_LEAP_YEAR),
tsCalc -= tsCalc / NON_LEAP_YEAR * NON_LEAP_YEAR,
leapYear = false;
}
else
// (y % 400) < 100
y100 = 0,
y4 = (uint16_t)(tsCalc / FOUR_YEARS_W_LJ),
tsCalc -= tsCalc / FOUR_YEARS_W_LJ * FOUR_YEARS_W_LJ,
leapQuad();
year = 1600 + 400 * y400 + 100 * y100 + 4 * y4 + y;
{
static
uint64_t const alignas(CL_SIZE) monthOffsets[2][12 + 1] =
{
{ 0 * DAY, 31 * DAY, 59 * DAY, 90 * DAY, 120 * DAY, 151 * DAY, 181 *
DAY, 212 * DAY, 243 * DAY, 273 * DAY, 304 * DAY, 334 * DAY, 999 * DAY },
{ 0 * DAY, 31 * DAY, 60 * DAY, 91 * DAY, 121 * DAY, 152 * DAY, 182 *
DAY, 213 * DAY, 244 * DAY, 274 * DAY, 305 * DAY, 335 * DAY, 999 * DAY }
};
uint64_t const *pMonthOffsets = monthOffsets[leapYear];
#if defined(BINARY_SEARCH)
size_t lower = 0, upper = 12, hit = -1, mid;
do
{
mid = (lower + upper) / 2;
if( pMonthOffsets[mid] <= tsCalc )
hit = mid,
lower = mid + 1;
else
upper = mid;
} while( lower != upper );
#else
size_t hit;
for( hit = 0; tsCalc >= pMonthOffsets[hit + 1]; ++hit );
#endif
assert(hit != -1);
uint8_t dy = (uint8_t)((tsCalc - pMonthOffsets[hit]) / DAY);
tsCalc -= pMonthOffsets[hit] + dy * DAY;
month = 1 + (uint8_t)hit;
day = 1 + dy;
}
hour = (uint8_t)(tsCalc / HOUR);
tsCalc %= HOUR;
minute = (uint8_t)(tsCalc / MINUTE);
tsCalc %= MINUTE;
second = (uint8_t)(tsCalc / SECOND);
tsCalc %= SECOND;
ns100 = (uint32_t)tsCalc;
}

system_time::operator uint64_t()
{ if( year < 1601 || year > 30827 ) [[unlikely]]
throw invalid_argument( "fromSystemTime() - year out of range" );
if( month < 1 || month > 12 ) [[unlikely]]
throw invalid_argument( "fromSystemTime() - month out of range" );
bool isLeapYear = year % 4 == 0 && year % 100 != 0 || year % 400 == 0;
static
uint8_t const alignas(CL_SIZE) montLengths[2][1 + 12] =
{
{ 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
{ 0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
};
if( day == 0 || day > montLengths[isLeapYear][month] ) [[unlikely]]
throw invalid_argument( "fromSystemTime() - day out of range" );
if( hour >= 24 ) [[unlikely]]
throw invalid_argument( "fromSystemTime() - hour out of range" );
if( minute >= 60 ) [[unlikely]]
throw invalid_argument( "fromSystemTime() - minute out of range" );
if( second >= 60 ) [[unlikely]]
throw invalid_argument( "fromSystemTime() - second out of range" );
if( ns100 >= 10'000'000 ) [[unlikely]]
throw invalid_argument( "fromSystemTime() - millisecond out of range" );
uint16_t yr = year - 1600;
uint64_t timeStamp = yr / 400 * FOUR_HUNDRED_YEARS;
yr %= 400;
auto leapQuad = [&]()
{
timeStamp += yr / 4 * FOUR_YEARS_W_LJ;
yr %= 4;
if( yr >= 1 ) [[likely]]
timeStamp += LEAP_YEAR + (yr - 1) * NON_LEAP_YEAR;
};
if( yr >= 100 ) [[likely]]
{
timeStamp += FIRST_QUARTER_CENTURY;
yr -= 100;
timeStamp += yr / 100 * REMAINING_QUARTER_CENUTRIES;
yr %= 100;
if( yr >= 4 ) [[likely]]
timeStamp += FOUR_YEARS_WO_LJ,
yr -= 4,
leapQuad();
else
timeStamp += yr * NON_LEAP_YEAR;
}
else
leapQuad();
timeStamp -= LEAP_YEAR; // - (1.1.1601 - 1.1.1600)
static
uint16_t const alignas(CL_SIZE) monthOffsets[2][1 + 12] =
{
{ 0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 },
{ 0, 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335 }
};
timeStamp += (monthOffsets[isLeapYear][month] + day - 1) * DAY;
timeStamp += hour * HOUR;
timeStamp += minute * MINUTE;
timeStamp += second * SECOND;
timeStamp += ns100;
return timeStamp;
}

Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<87bkypmy8c.fsf@bsb.me.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20641&group=comp.lang.c#20641

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Tue, 01 Mar 2022 16:30:43 +0000
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <87bkypmy8c.fsf@bsb.me.uk>
References: <svjioa$afj$1@dont-email.me>
<chine.bleu-1A06C2.17382228022022@reader.eternal-september.org>
<UpgTJ.58459$z688.14383@fx35.iad> <875yoynx7j.fsf@bsb.me.uk>
<874k4inu4v.fsf@nosuchdomain.example.com> <svktjb$ppi$1@dont-email.me>
<86140869-8136-4df5-8f3f-96b192a5a00fn@googlegroups.com>
<svlgv9$biv$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="93bc2011e44f702d684b46c2bd3a57ff";
logging-data="23115"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19gj5ayXf4YKafKk7En2HmOXgOUpV1Kuv0="
Cancel-Lock: sha1:UVpaf4ZYced1MI4L5QoGMECCT3g=
sha1:Vjdcj6F3OoqQHsb/I4eIII0XZ5c=
X-BSB-Auth: 1.fc6aa797cd9039fc5f20.20220301163043GMT.87bkypmy8c.fsf@bsb.me.uk
 by: Ben Bacarisse - Tue, 1 Mar 2022 16:30 UTC

David Brown <david.brown@hesbynett.no> writes:

> On 01/03/2022 14:19, Malcolm McLean wrote:
>> On Tuesday, 1 March 2022 at 10:47:37 UTC, David Brown wrote:
>>>
>>> Small embedded systems rarely care about the current time, never mind
>>> the year. Those that do, but are limited enough to not have support for
>>> 64-bit types, will not use time_t or any other standard C time or date
>>> functions - they'll handle it "manually".
>>>
>> My sister's oven contains a clock. As does my central heating controller.
>> Admittedly that's only two out of many microprocessors, some of which
>> we are doubtless unaware of even owning. But it's enough for Y2038 to
>> be a potential nuisance.
>
> And how many years do you cook for at a time? Ovens generally do not
> bother much about the real time (and even less about the date). Central
> heating systems know the time of day, but rarely bother much about the
> date - certainly not the year.

I agree with your general point, but not what you say about ovens and
heating systems. My oven knows the real time (I can set it to come on
automatically) and my heating controller knows the date (I can set a
"holiday" so that it only keeps the chill off during specified dates).
I don't think these are rare features these days.

--
Ben.

Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<slrnt1siq4.2q6.dan@djph.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20642&group=comp.lang.c#20642

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: dan...@djph.net (Dan Purgert)
Newsgroups: comp.lang.c
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Tue, 1 Mar 2022 16:34:28 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 55
Message-ID: <slrnt1siq4.2q6.dan@djph.net>
References: <svjioa$afj$1@dont-email.me>
<chine.bleu-1A06C2.17382228022022@reader.eternal-september.org>
<UpgTJ.58459$z688.14383@fx35.iad> <875yoynx7j.fsf@bsb.me.uk>
<874k4inu4v.fsf@nosuchdomain.example.com> <svktjb$ppi$1@dont-email.me>
<86140869-8136-4df5-8f3f-96b192a5a00fn@googlegroups.com>
<slrnt1s865.2q6.dan@djph.net>
<4c40bddf-3fed-41d6-907d-527b05f890b6n@googlegroups.com>
Injection-Date: Tue, 1 Mar 2022 16:34:28 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="df807771e26b7e9c9046e78b77d6561c";
logging-data="20148"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ZTConOKQCFZlRck1/aFTRUEDccCgI9xA="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:YIXq+KXoB79OjROWBRBt2w9IvCE=
X-PGP-KeyID: 0x4CE72860
 by: Dan Purgert - Tue, 1 Mar 2022 16:34 UTC

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Malcolm McLean wrote:
> On Tuesday, 1 March 2022 at 13:33:41 UTC, Dan Purgert wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA512
>> Malcolm McLean wrote:
>> > On Tuesday, 1 March 2022 at 10:47:37 UTC, David Brown wrote:
>> >>
>> >> Small embedded systems rarely care about the current time, never mind
>> >> the year. Those that do, but are limited enough to not have support for
>> >> 64-bit types, will not use time_t or any other standard C time or date
>> >> functions - they'll handle it "manually".
>> >>
>> > My sister's oven contains a clock. As does my central heating controller.
>> > Admittedly that's only two out of many microprocessors, some of which
>> > we are doubtless unaware of even owning. But it's enough for Y2038 to
>> > be a potential nuisance.
>> Does the clock happen to count the year and/or reference the UNIX Epoch
>> at all? My microwave / oven don't...
>>
> I don't have access to the code. But it will have a function called
> something like query_clock(), That might return hour /minute /second,
> with caller responsible for wrapping at midnight. Or it might return a
> "time in seconds since an arbitrary date", in which case caller
> doens't need to bother about wrapping, until the width of the return
> value overflow.

Yeah, I guess we can come up with any point / counterpoint as to why
2038 (or equivalent) would or would not be problematic for such devices,
huh?

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE3asj+xn6fYUcweBnbWVw5UznKGAFAmIeS0EACgkQbWVw5Uzn
KGDgnQ//eOrs1Xp3ieLQbKs/mqI4t2tkdkduda+0l1SPGXDyJ9rhMzs7de89tpbh
rzdgSPR/SZ5KBviTMnuSmmtknGH/IVvQUa2ll2ov77NHmMBfW7wHzcx5SaniVWdZ
JMlBZYC+VSlR6N3cywxtGVFTxb9Mgpzjs7JLkYY3YkxAhY/a6UIcGtRdGy2qchTF
7vQBLrkLXjkh7ZKJyZy4i1TmzioNTLqS0hAxGY1Mv9eKn/wolwkCC+oRnYW4ZwVM
GB42A9TwkRnDl9wlCFY0QZA6lyJx58W0f10aQ1kpi75dSS4zsZ36oEeNCs3up8X5
h+XAVJDIjyYi+kWo3rlflMa6TXaddtPvoqWwEyir9lfdjGm4b1AGBU+fwH9qjF3y
wuljQSqS2yuleKkslawBevIKcWAgFytbmk4N/Sf632yLp81WGtTMZFOTDGhfu4mV
SBLE5zs2vjh4hEWlgVnlnvXgHGjFUe1qarYTUHewNMJQuz2nU7uoahmDnXlREJ64
kJED6yP0/dDUAU/5PH0U8BeXgmG4XAIW5V+YVlZAJMLbO+n5Vf2tDOqN+yQgbe+n
fk2M9ajiNPKygjbW792bcayHsNOiYuxxcTxKi65XQxFM9cM146vNUNtvzFzyRoGd
6UqobXGzpMDKo7AIFlLgQl8d0ijP5Ly5zfOT061pUoehDBDTJTo=
=Vlmb
-----END PGP SIGNATURE-----

--
|_|O|_|
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860

Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<i0sTJ.90230$f2a5.31419@fx48.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20643&group=comp.lang.c#20643

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx48.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Newsgroups: comp.lang.c
References: <svjioa$afj$1@dont-email.me> <chine.bleu-1A06C2.17382228022022@reader.eternal-september.org> <UpgTJ.58459$z688.14383@fx35.iad> <875yoynx7j.fsf@bsb.me.uk> <874k4inu4v.fsf@nosuchdomain.example.com> <svktjb$ppi$1@dont-email.me> <86140869-8136-4df5-8f3f-96b192a5a00fn@googlegroups.com> <slrnt1s865.2q6.dan@djph.net> <4c40bddf-3fed-41d6-907d-527b05f890b6n@googlegroups.com>
Lines: 29
Message-ID: <i0sTJ.90230$f2a5.31419@fx48.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Tue, 01 Mar 2022 16:40:46 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Tue, 01 Mar 2022 16:40:46 GMT
X-Received-Bytes: 2532
 by: Scott Lurndal - Tue, 1 Mar 2022 16:40 UTC

Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>On Tuesday, 1 March 2022 at 13:33:41 UTC, Dan Purgert wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA512
>> Malcolm McLean wrote:
>> > On Tuesday, 1 March 2022 at 10:47:37 UTC, David Brown wrote:
>> >>
>> >> Small embedded systems rarely care about the current time, never mind
>> >> the year. Those that do, but are limited enough to not have support for
>> >> 64-bit types, will not use time_t or any other standard C time or date
>> >> functions - they'll handle it "manually".
>> >>
>> > My sister's oven contains a clock. As does my central heating controller.
>> > Admittedly that's only two out of many microprocessors, some of which
>> > we are doubtless unaware of even owning. But it's enough for Y2038 to
>> > be a potential nuisance.
>> Does the clock happen to count the year and/or reference the UNIX Epoch
>> at all? My microwave / oven don't...
>>
>I don't have access to the code. But it will have a function called something like
>query_clock(), That might return hour /minute /second, with caller responsible
>for wrapping at midnight. Or it might return a "time in seconds since an arbitrary
>date", in which case caller doens't need to bother about wrapping, until the
>width of the return value overflow.

Or far more likely, it simply maintains 4 BCD digits (two hour and two minute)
advancing the MM by 1 every 60 seconds using a simple 60hz timer based on the
AC frequency.

Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<_1sTJ.90231$f2a5.1933@fx48.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20644&group=comp.lang.c#20644

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx48.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Newsgroups: comp.lang.c
References: <svjioa$afj$1@dont-email.me> <chine.bleu-1A06C2.17382228022022@reader.eternal-september.org> <UpgTJ.58459$z688.14383@fx35.iad> <svke6f$1ip1$1@gioia.aioe.org> <j869rhFhda6U3@mid.individual.net> <svlavd$s7u$1@dont-email.me> <svlh97$dvf$1@dont-email.me>
Lines: 7
Message-ID: <_1sTJ.90231$f2a5.1933@fx48.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Tue, 01 Mar 2022 16:42:34 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Tue, 01 Mar 2022 16:42:34 GMT
X-Received-Bytes: 1099
 by: Scott Lurndal - Tue, 1 Mar 2022 16:42 UTC

Bonita Montero <Bonita.Montero@gmail.com> writes:

>Here's a nice C++-class I've written that resembles Win32

<200 lines of grossly verbose (worse than COBOL) C++ elided>

This is comp.lang.c.

Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<svljdm$uqa$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20645&group=comp.lang.c#20645

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Tue, 1 Mar 2022 17:59:37 +0100
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <svljdm$uqa$1@dont-email.me>
References: <svjioa$afj$1@dont-email.me>
<chine.bleu-1A06C2.17382228022022@reader.eternal-september.org>
<UpgTJ.58459$z688.14383@fx35.iad> <svke6f$1ip1$1@gioia.aioe.org>
<j869rhFhda6U3@mid.individual.net> <svlavd$s7u$1@dont-email.me>
<svlh97$dvf$1@dont-email.me> <_1sTJ.90231$f2a5.1933@fx48.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 1 Mar 2022 16:59:34 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="5810512e555e646a4ebb234d1b5db876";
logging-data="31562"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19gbU7B3qrhAmCHVfLLP4v5XM/QT+rE4xo="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.6.1
Cancel-Lock: sha1:2BIWfcWKYWe3Kbclu0SsjK1zcms=
In-Reply-To: <_1sTJ.90231$f2a5.1933@fx48.iad>
Content-Language: de-DE
 by: Bonita Montero - Tue, 1 Mar 2022 16:59 UTC

Am 01.03.2022 um 17:42 schrieb Scott Lurndal:
> Bonita Montero <Bonita.Montero@gmail.com> writes:
>
>> Here's a nice C++-class I've written that resembles Win32
>
> <200 lines of grossly verbose (worse than COBOL) C++ elided>
>
> This is comp.lang.c.

It's about the general algorithms of timestamp-conversion.
Ther wouldn't be a huge difference if they were implemented in C.

Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<svljf5$uqa$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20646&group=comp.lang.c#20646

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Tue, 1 Mar 2022 18:00:24 +0100
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <svljf5$uqa$2@dont-email.me>
References: <svjioa$afj$1@dont-email.me>
<chine.bleu-1A06C2.17382228022022@reader.eternal-september.org>
<UpgTJ.58459$z688.14383@fx35.iad> <svke6f$1ip1$1@gioia.aioe.org>
<j869rhFhda6U3@mid.individual.net> <svlavd$s7u$1@dont-email.me>
<svlh97$dvf$1@dont-email.me> <_1sTJ.90231$f2a5.1933@fx48.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 1 Mar 2022 17:00:21 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="5810512e555e646a4ebb234d1b5db876";
logging-data="31562"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18kzgditz2MUV6UyI8nmu9HWhp5+irIEEA="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.6.1
Cancel-Lock: sha1:NQE7PTsNR8HSbgBN+bVwgcrpEss=
In-Reply-To: <_1sTJ.90231$f2a5.1933@fx48.iad>
Content-Language: de-DE
 by: Bonita Montero - Tue, 1 Mar 2022 17:00 UTC

Am 01.03.2022 um 17:42 schrieb Scott Lurndal:
> Bonita Montero <Bonita.Montero@gmail.com> writes:
>
>> Here's a nice C++-class I've written that resembles Win32
>
> <200 lines of grossly verbose (worse than COBOL) C++ elided>

And my code isn't worse than cobol but extremely readable.
Your code is a piece of shit.

Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<svlka9$5tq$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20648&group=comp.lang.c#20648

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Tue, 1 Mar 2022 18:14:52 +0100
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <svlka9$5tq$2@dont-email.me>
References: <svjioa$afj$1@dont-email.me>
<chine.bleu-1A06C2.17382228022022@reader.eternal-september.org>
<UpgTJ.58459$z688.14383@fx35.iad> <svke6f$1ip1$1@gioia.aioe.org>
<j869rhFhda6U3@mid.individual.net> <svlavd$s7u$1@dont-email.me>
<svlh97$dvf$1@dont-email.me> <_1sTJ.90231$f2a5.1933@fx48.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 1 Mar 2022 17:14:49 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="5810512e555e646a4ebb234d1b5db876";
logging-data="6074"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18RCli6bbQGY7OSWYKw7OOR4WD/jBsWGoI="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.6.1
Cancel-Lock: sha1:8YM3s7eH7IN8dvxqgXCrv5PFDys=
In-Reply-To: <_1sTJ.90231$f2a5.1933@fx48.iad>
Content-Language: de-DE
 by: Bonita Montero - Tue, 1 Mar 2022 17:14 UTC

Am 01.03.2022 um 17:42 schrieb Scott Lurndal:
> Bonita Montero <Bonita.Montero@gmail.com> writes:
>
>> Here's a nice C++-class I've written that resembles Win32
>
> <200 lines of grossly verbose (worse than COBOL) C++ elided>

And the verbosity comes from a personality than can combine verbal
thinking and logical thinking good. Cryptic coding usually comes
from poor minds which can't combine this skills.

Pages:1234
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor