Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

The solution to a problem changes the nature of the problem. -- Peer


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
Re: "Year 2038 problem is still alive and well" by CookiePLMonster

<775aa434-0536-4199-998d-2730875c7ed6n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:ac8:574d:0:b0:2de:627:479a with SMTP id 13-20020ac8574d000000b002de0627479amr1009014qtx.349.1646435926152;
Fri, 04 Mar 2022 15:18:46 -0800 (PST)
X-Received: by 2002:a05:6214:4010:b0:435:2bed:1936 with SMTP id
kd16-20020a056214401000b004352bed1936mr679627qvb.4.1646435926052; Fri, 04 Mar
2022 15:18:46 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Fri, 4 Mar 2022 15:18:45 -0800 (PST)
In-Reply-To: <chine.bleu-4E5C72.15072804032022@reader.eternal-september.org>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:e85a:d071:54cf:fa85;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:e85a:d071:54cf:fa85
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>
<svksmc$j3p$1@dont-email.me> <chine.bleu-67679C.07200502032022@reader.eternal-september.org>
<svo5uu$r3f$1@dont-email.me> <svogun$rrr$1@dont-email.me> <3b8b38c9-57a8-4138-a08f-98951651fc18n@googlegroups.com>
<87mti7nb1o.fsf@nosuchdomain.example.com> <svr4gr$8cc$1@dont-email.me>
<svrpao$1pv2$1@gioia.aioe.org> <svslgv$ss7$1@dont-email.me>
<svsnd6$dh0$1@dont-email.me> <svt4g5$440$1@dont-email.me> <slrnt248o6.k2j.dan@djph.net>
<svt9hc$il8$1@dont-email.me> <slrnt24d0n.k2j.dan@djph.net>
<874k4d8ojg.fsf@tigger.extechop.net> <chine.bleu-4E5C72.15072804032022@reader.eternal-september.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <775aa434-0536-4199-998d-2730875c7ed6n@googlegroups.com>
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
From: malcolm....@gmail.com (Malcolm McLean)
Injection-Date: Fri, 04 Mar 2022 23:18:46 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Malcolm McLean - Fri, 4 Mar 2022 23:18 UTC

On Friday, 4 March 2022 at 23:09:19 UTC, Siri Cruise wrote:
> In article <874k4d8...@tigger.extechop.net>,
> o...@iki.fi (Otto J. Makela) wrote:
>
> > The mains frequency is a rather good timebase: the base frequency (be it
> > 50 or 60 Hz) is very rigidly maintained, because otherwise the whole
> > interconnected power network would very quickly fall apart.
> How can that be true? All the experts are chiming in that it's
> impossible to have a stanardised and rigidly adhered to anything
> about the grid.
>
When I was a child we lived over the road from a supermarket.
The telly would blank out when they turned their ovens on due to the
load on the grid.

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

<nnd$0ce3b333$1344114e@5e8aa6fcc0002811>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Newsgroups: comp.lang.c
From: me...@this.is.invalid (Stef)
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
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>
<svksmc$j3p$1@dont-email.me>
<chine.bleu-67679C.07200502032022@reader.eternal-september.org>
<svo5uu$r3f$1@dont-email.me> <svogun$rrr$1@dont-email.me>
<3b8b38c9-57a8-4138-a08f-98951651fc18n@googlegroups.com>
<87mti7nb1o.fsf@nosuchdomain.example.com> <svr4gr$8cc$1@dont-email.me>
<svrpao$1pv2$1@gioia.aioe.org> <svslgv$ss7$1@dont-email.me>
<svsnd6$dh0$1@dont-email.me> <svt4g5$440$1@dont-email.me>
<slrnt248o6.k2j.dan@djph.net> <svt9hc$il8$1@dont-email.me>
<slrnt24d0n.k2j.dan@djph.net> <874k4d8ojg.fsf@tigger.extechop.net>
<chine.bleu-4E5C72.15072804032022@reader.eternal-september.org>
Mail-Copies-To: nobody
User-Agent: slrn/1.0.3 (Linux)
Message-ID: <nnd$0ce3b333$1344114e@5e8aa6fcc0002811>
Organization: Newsxs
Date: Sat, 05 Mar 2022 00:48:08 +0100
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe004.abavia.com!abp002.abavia.com!news.newsxs.nl!not-for-mail
Lines: 27
Injection-Date: Sat, 05 Mar 2022 00:48:08 +0100
Injection-Info: news.newsxs.nl; mail-complaints-to="abuse@newsxs.nl"
X-Received-Bytes: 2544
 by: Stef - Fri, 4 Mar 2022 23:48 UTC

On 2022-03-04 Siri Cruise wrote in comp.lang.c:
> In article <874k4d8ojg.fsf@tigger.extechop.net>,
> om@iki.fi (Otto J. Makela) wrote:
>
>> The mains frequency is a rather good timebase: the base frequency (be it
>> 50 or 60 Hz) is very rigidly maintained, because otherwise the whole
>> interconnected power network would very quickly fall apart.
>
> How can that be true? All the experts are chiming in that it's
> impossible to have a stanardised and rigidly adhered to anything
> about the grid.

Mains frequency is tightly controlled:
https://en.wikipedia.org/wiki/Utility_frequency#Time_error_correction_(TEC)

Load variations can cause short-time variations, but average frequency
is maintained. At least in normal conditions. A while back a few Balkan
countries did not supply their promised amount of electricity, causing a
slight drop in frequency in Europe for months. This caused all clocks
that use mains for their time base to lag by 6 minutes.

--
Stef

Thank god!! ... It's HENNY YOUNGMAN!!

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

<871qzhmdpj.fsf@nosuchdomain.example.com>

  copy mid

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

  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: Fri, 04 Mar 2022 16:43:04 -0800
Organization: None to speak of
Lines: 25
Message-ID: <871qzhmdpj.fsf@nosuchdomain.example.com>
References: <svjioa$afj$1@dont-email.me> <UpgTJ.58459$z688.14383@fx35.iad>
<875yoynx7j.fsf@bsb.me.uk> <874k4inu4v.fsf@nosuchdomain.example.com>
<chine.bleu-2F5314.23105028022022@reader.eternal-september.org>
<svksmc$j3p$1@dont-email.me>
<chine.bleu-67679C.07200502032022@reader.eternal-september.org>
<svo5uu$r3f$1@dont-email.me> <svogun$rrr$1@dont-email.me>
<3b8b38c9-57a8-4138-a08f-98951651fc18n@googlegroups.com>
<87mti7nb1o.fsf@nosuchdomain.example.com> <svr4gr$8cc$1@dont-email.me>
<svrpao$1pv2$1@gioia.aioe.org> <svslgv$ss7$1@dont-email.me>
<svsnd6$dh0$1@dont-email.me> <svt4g5$440$1@dont-email.me>
<slrnt248o6.k2j.dan@djph.net> <svt9hc$il8$1@dont-email.me>
<slrnt24d0n.k2j.dan@djph.net> <874k4d8ojg.fsf@tigger.extechop.net>
<chine.bleu-4E5C72.15072804032022@reader.eternal-september.org>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="0ec1b294aa199fbe0d6081b2ed764838";
logging-data="11438"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18oPOWy5oLtlJk05pF4yFgm"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:0LRi/ZT3CUO6RlsJQNniigPGUvA=
sha1:ne11Zv/NBsiCPnVP9PHeR1MHt4c=
 by: Keith Thompson - Sat, 5 Mar 2022 00:43 UTC

Siri Cruise <chine.bleu@yahoo.com> writes:
> In article <874k4d8ojg.fsf@tigger.extechop.net>,
> om@iki.fi (Otto J. Makela) wrote:
>
>> The mains frequency is a rather good timebase: the base frequency (be it
>> 50 or 60 Hz) is very rigidly maintained, because otherwise the whole
>> interconnected power network would very quickly fall apart.

> How can that be true?

Because a lot of people did a lot of work to make it true. It's not my
area of expertise, so I don't know the details. It also has nothing to
do with C, so if you want to learn more about it I suggest going
elsewhere.

> All the experts are chiming in that it's
> impossible to have a stanardised and rigidly adhered to anything
> about the grid.

Literally no experts have said that. Stop trolling.

--
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

<svuca0$f70$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: 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
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Fri, 4 Mar 2022 18:53:20 -0600
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <svuca0$f70$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>
<svksmc$j3p$1@dont-email.me>
<chine.bleu-67679C.07200502032022@reader.eternal-september.org>
<svo5uu$r3f$1@dont-email.me> <svogun$rrr$1@dont-email.me>
<3b8b38c9-57a8-4138-a08f-98951651fc18n@googlegroups.com>
<87mti7nb1o.fsf@nosuchdomain.example.com> <svr4gr$8cc$1@dont-email.me>
<svrpao$1pv2$1@gioia.aioe.org> <svslgv$ss7$1@dont-email.me>
<svsnd6$dh0$1@dont-email.me> <svt4g5$440$1@dont-email.me>
<slrnt248o6.k2j.dan@djph.net> <svt9hc$il8$1@dont-email.me>
<slrnt24d0n.k2j.dan@djph.net> <874k4d8ojg.fsf@tigger.extechop.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 5 Mar 2022 00:53:20 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="bb9cfeb2d07d51fe3d2c352251fa18f6";
logging-data="15584"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+OyOvEIDBgXsZXYfZkWgL7"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.6.1
Cancel-Lock: sha1:v28HR1PQ9vXckb+HVBi/F/tfyWU=
In-Reply-To: <874k4d8ojg.fsf@tigger.extechop.net>
Content-Language: en-US
 by: Lynn McGuire - Sat, 5 Mar 2022 00:53 UTC

On 3/4/2022 2:12 PM, Otto J. Makela wrote:
> Dan Purgert <dan@djph.net> wrote:
>
>> I guess we can say I've lost the plot somewhere then -- I just can't
>> piece together how this would improve "timekeeping" on a device
>> plugged into the mains.
>
> The mains frequency is a rather good timebase: the base frequency (be it
> 50 or 60 Hz) is very rigidly maintained, because otherwise the whole
> interconnected power network would very quickly fall apart.
>
> https://www.mainsfrequency.com/gridtime.php

Don't forget the DC grid, mostly grid interconnects.

And ERCOT in Texas tells people to not run their clocks based on the
frequency even though all AC clocks use the frequency for their timeliness.

Lynn

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

<chine.bleu-1ABAF2.17492704032022@reader.eternal-september.org>

  copy mid

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

  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: Fri, 04 Mar 2022 17:49:35 -0800
Organization: Pseudochaotic.
Lines: 13
Message-ID: <chine.bleu-1ABAF2.17492704032022@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> <chine.bleu-2F5314.23105028022022@reader.eternal-september.org> <svksmc$j3p$1@dont-email.me> <chine.bleu-67679C.07200502032022@reader.eternal-september.org> <svo5uu$r3f$1@dont-email.me> <svogun$rrr$1@dont-email.me> <3b8b38c9-57a8-4138-a08f-98951651fc18n@googlegroups.com> <87mti7nb1o.fsf@nosuchdomain.example.com> <svr4gr$8cc$1@dont-email.me> <svrpao$1pv2$1@gioia.aioe.org> <svslgv$ss7$1@dont-email.me> <svsnd6$dh0$1@dont-email.me> <svt4g5$440$1@dont-email.me> <slrnt248o6.k2j.dan@djph.net> <svt9hc$il8$1@dont-email.me> <slrnt24d0n.k2j.dan@djph.net> <874k4d8ojg.fsf@tigger.extechop.net> <svuca0$f70$1@dont-email.me>
Injection-Info: reader02.eternal-september.org; posting-host="d47a9ee3a83c97df805399ca472a9d78";
logging-data="879"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19drX63RmwWO0wMHXVF38l5ilArhiRZfi0="
User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)
Cancel-Lock: sha1:JcfQmp/d4U+RMDyuNV63jEUi0NU=
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 - Sat, 5 Mar 2022 01:49 UTC

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

> And ERCOT in Texas tells people to not run their clocks based on the

So Texas supplies residential and business customer DC instead of
AC? Do they also replace on devices expecting AC?

--
:-<> 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

<chine.bleu-19CEC2.17512504032022@reader.eternal-september.org>

  copy mid

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

  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: Fri, 04 Mar 2022 17:51:33 -0800
Organization: Pseudochaotic.
Lines: 17
Message-ID: <chine.bleu-19CEC2.17512504032022@reader.eternal-september.org>
References: <svjioa$afj$1@dont-email.me> <UpgTJ.58459$z688.14383@fx35.iad> <875yoynx7j.fsf@bsb.me.uk> <874k4inu4v.fsf@nosuchdomain.example.com> <chine.bleu-2F5314.23105028022022@reader.eternal-september.org> <svksmc$j3p$1@dont-email.me> <chine.bleu-67679C.07200502032022@reader.eternal-september.org> <svo5uu$r3f$1@dont-email.me> <svogun$rrr$1@dont-email.me> <3b8b38c9-57a8-4138-a08f-98951651fc18n@googlegroups.com> <87mti7nb1o.fsf@nosuchdomain.example.com> <svr4gr$8cc$1@dont-email.me> <svrpao$1pv2$1@gioia.aioe.org> <svslgv$ss7$1@dont-email.me> <svsnd6$dh0$1@dont-email.me> <svt4g5$440$1@dont-email.me> <slrnt248o6.k2j.dan@djph.net> <svt9hc$il8$1@dont-email.me> <slrnt24d0n.k2j.dan@djph.net> <874k4d8ojg.fsf@tigger.extechop.net> <chine.bleu-4E5C72.15072804032022@reader.eternal-september.org> <871qzhmdpj.fsf@nosuchdomain.example.com>
Injection-Info: reader02.eternal-september.org; posting-host="d47a9ee3a83c97df805399ca472a9d78";
logging-data="879"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Fvh5zktZS99n7jiRzXDwY/BSJaUQTHtY="
User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)
Cancel-Lock: sha1:V9w0B+bRgr2Aq4v1sOi223HguxQ=
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 - Sat, 5 Mar 2022 01:51 UTC

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

> > All the experts are chiming in that it's
> > impossible to have a stanardised and rigidly adhered to anything
> > about the grid.
>
> Literally no experts have said that. Stop trolling.

Do say. Thanks for confirming my long held opinion of the kind of
people who enjoy attacking newbies.

--
:-<> 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

<chine.bleu-FCD47A.17535404032022@reader.eternal-september.org>

  copy mid

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

  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: Fri, 04 Mar 2022 17:54:02 -0800
Organization: Pseudochaotic.
Lines: 18
Message-ID: <chine.bleu-FCD47A.17535404032022@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> <chine.bleu-2F5314.23105028022022@reader.eternal-september.org> <svksmc$j3p$1@dont-email.me> <chine.bleu-67679C.07200502032022@reader.eternal-september.org> <svo5uu$r3f$1@dont-email.me> <svogun$rrr$1@dont-email.me> <3b8b38c9-57a8-4138-a08f-98951651fc18n@googlegroups.com> <87mti7nb1o.fsf@nosuchdomain.example.com> <svr4gr$8cc$1@dont-email.me> <svrpao$1pv2$1@gioia.aioe.org> <svslgv$ss7$1@dont-email.me> <svsnd6$dh0$1@dont-email.me> <svt4g5$440$1@dont-email.me> <slrnt248o6.k2j.dan@djph.net> <svt9hc$il8$1@dont-email.me> <slrnt24d0n.k2j.dan@djph.net> <874k4d8ojg.fsf@tigger.extechop.net> <chine.bleu-4E5C72.15072804032022@reader.eternal-september.org> <nnd$0ce3b333$1344114e@5e8aa6fcc0002811>
Injection-Info: reader02.eternal-september.org; posting-host="d47a9ee3a83c97df805399ca472a9d78";
logging-data="879"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18wjzIWsEeabI9eoWT6BWWREbJHS2yvk+E="
User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)
Cancel-Lock: sha1:AsMqilXUzwBnCXJ7TG3r98wvMF8=
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 - Sat, 5 Mar 2022 01:54 UTC

In article <nnd$0ce3b333$1344114e@5e8aa6fcc0002811>,
Stef <me@this.is.invalid> wrote:

> > How can that be true? All the experts are chiming in that it's
> > impossible to have a stanardised and rigidly adhered to anything
> > about the grid.
>
> Mains frequency is tightly controlled:

No shit. But what about all the experts who chimed in that
message passing on an AC grid was impossible because all the
different operators made it too chaotic?

--
:-<> 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

<svuml5$efk$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: 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
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Fri, 4 Mar 2022 21:49:57 -0600
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <svuml5$efk$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> <875yoynx7j.fsf@bsb.me.uk>
<874k4inu4v.fsf@nosuchdomain.example.com>
<chine.bleu-2F5314.23105028022022@reader.eternal-september.org>
<svksmc$j3p$1@dont-email.me>
<chine.bleu-67679C.07200502032022@reader.eternal-september.org>
<svo5uu$r3f$1@dont-email.me> <svogun$rrr$1@dont-email.me>
<3b8b38c9-57a8-4138-a08f-98951651fc18n@googlegroups.com>
<87mti7nb1o.fsf@nosuchdomain.example.com> <svr4gr$8cc$1@dont-email.me>
<svrpao$1pv2$1@gioia.aioe.org> <svslgv$ss7$1@dont-email.me>
<svsnd6$dh0$1@dont-email.me> <svt4g5$440$1@dont-email.me>
<slrnt248o6.k2j.dan@djph.net> <svt9hc$il8$1@dont-email.me>
<slrnt24d0n.k2j.dan@djph.net> <874k4d8ojg.fsf@tigger.extechop.net>
<svuca0$f70$1@dont-email.me>
<chine.bleu-1ABAF2.17492704032022@reader.eternal-september.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 5 Mar 2022 03:49:58 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="bb9cfeb2d07d51fe3d2c352251fa18f6";
logging-data="14836"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+A094Zjgqz2Pr4tn2Zei/E"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.6.1
Cancel-Lock: sha1:4yg8rGtvNLQtoZFqdm5rKCgo1WM=
In-Reply-To: <chine.bleu-1ABAF2.17492704032022@reader.eternal-september.org>
Content-Language: en-US
 by: Lynn McGuire - Sat, 5 Mar 2022 03:49 UTC

On 3/4/2022 7:49 PM, Siri Cruise wrote:
> In article <svuca0$f70$1@dont-email.me>,
> Lynn McGuire <lynnmcguire5@gmail.com> wrote:
>
>> And ERCOT in Texas tells people to not run their clocks based on the
>
> So Texas supplies residential and business customer DC instead of
> AC? Do they also replace on devices expecting AC?

There is no residential DC in Texas that I know of. Most of the DC
grids around the world are for old electric train systems as modern
electric train systems run on AC.

Lynn

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

<svvgur$mmt$1@dont-email.me>

  copy mid

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

  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: Sat, 5 Mar 2022 12:18:51 +0100
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <svvgur$mmt$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>
<svksmc$j3p$1@dont-email.me>
<chine.bleu-67679C.07200502032022@reader.eternal-september.org>
<svo5uu$r3f$1@dont-email.me> <svogun$rrr$1@dont-email.me>
<3b8b38c9-57a8-4138-a08f-98951651fc18n@googlegroups.com>
<87mti7nb1o.fsf@nosuchdomain.example.com> <svr4gr$8cc$1@dont-email.me>
<svrpao$1pv2$1@gioia.aioe.org> <svslgv$ss7$1@dont-email.me>
<svsnd6$dh0$1@dont-email.me> <svt4g5$440$1@dont-email.me>
<slrnt248o6.k2j.dan@djph.net> <svt9hc$il8$1@dont-email.me>
<slrnt24d0n.k2j.dan@djph.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 5 Mar 2022 11:18:51 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="f451f40debc5b0a2519079f7c10763d3";
logging-data="23261"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX196BGvoZXKLERzMJ3WZqu7qZ+UpcCwatFA="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:YvMNup7i6Ou+/k65DDRX33x2Ydo=
In-Reply-To: <slrnt24d0n.k2j.dan@djph.net>
Content-Language: en-GB
 by: David Brown - Sat, 5 Mar 2022 11:18 UTC

On 04/03/2022 16:44, Dan Purgert wrote:
> David Brown wrote:
>> On 04/03/2022 15:31, Dan Purgert wrote:
>>>
>>> Honestly though, even using the AC line sounds like its adding
>>> complexity for little (or no) benefit to my oven/microwave/etc. Also,
>>> how's it gonna handle different line frequency? As a manufacturer, am I
>>> gonna need half a dozen different designs of the same product to
>>> accommodate line frequency?
>
>> There are only two frequencies used - 50 Hz and 60 Hz. It's not hard to
>> make automatic detection of which of these you are seeing, as you always
>> have some kind of frequency reference for your microcontroller.
>
> Whoops, that was supposed to be "multiple", not "half a dozen". Thought
> process collisions are just wonderful, aren't they.
>

I thought it was a perfectly reasonable question. I've done this kind
of thing, but most programmers haven't been anywhere near such
electronics questions and thus don't have the experience to know what
might be easy or hard in practice.

> I guess we can say I've lost the plot somewhere then -- I just can't
> piece together how this would improve "timekeeping" on a device plugged
> into the mains.
>

A microcontroller can use the AC line frequency for a reference for the
price of one resistor, so it will give you better long-term drift
accuracy for your money than using a crystal oscillator reference. It
is thus quite common practice for things like kitchen appliances that
have a simple clock.

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

<svvh5j$mmt$2@dont-email.me>

  copy mid

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

  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: Sat, 5 Mar 2022 12:22:27 +0100
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <svvh5j$mmt$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> <875yoynx7j.fsf@bsb.me.uk>
<874k4inu4v.fsf@nosuchdomain.example.com>
<chine.bleu-2F5314.23105028022022@reader.eternal-september.org>
<svksmc$j3p$1@dont-email.me>
<chine.bleu-67679C.07200502032022@reader.eternal-september.org>
<svo5uu$r3f$1@dont-email.me> <svogun$rrr$1@dont-email.me>
<3b8b38c9-57a8-4138-a08f-98951651fc18n@googlegroups.com>
<87mti7nb1o.fsf@nosuchdomain.example.com> <svr4gr$8cc$1@dont-email.me>
<svrpao$1pv2$1@gioia.aioe.org> <svslgv$ss7$1@dont-email.me>
<svsnd6$dh0$1@dont-email.me> <svt4g5$440$1@dont-email.me>
<slrnt248o6.k2j.dan@djph.net> <svt9hc$il8$1@dont-email.me>
<slrnt24d0n.k2j.dan@djph.net> <874k4d8ojg.fsf@tigger.extechop.net>
<chine.bleu-4E5C72.15072804032022@reader.eternal-september.org>
<nnd$0ce3b333$1344114e@5e8aa6fcc0002811>
<chine.bleu-FCD47A.17535404032022@reader.eternal-september.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 5 Mar 2022 11:22:27 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="f451f40debc5b0a2519079f7c10763d3";
logging-data="23261"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+vodxgE0p63FcpbaOg02nsxxbcrFYE5yw="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:kOANAP78wPbkai7Jw3p3Hb4E/Yc=
In-Reply-To: <chine.bleu-FCD47A.17535404032022@reader.eternal-september.org>
Content-Language: en-GB
 by: David Brown - Sat, 5 Mar 2022 11:22 UTC

On 05/03/2022 02:54, Siri Cruise wrote:
> In article <nnd$0ce3b333$1344114e@5e8aa6fcc0002811>,
> Stef <me@this.is.invalid> wrote:
>
>>> How can that be true? All the experts are chiming in that it's
>>> impossible to have a stanardised and rigidly adhered to anything
>>> about the grid.
>>
>> Mains frequency is tightly controlled:
>
> No shit. But what about all the experts who chimed in that
> message passing on an AC grid was impossible because all the
> different operators made it too chaotic?
>

The AC frequency is fundamental to the way AC power distribution works -
it has nothing at all to do with sending additional messages on top of
the power lines!

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

<svvhct$mmt$3@dont-email.me>

  copy mid

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

  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: Sat, 5 Mar 2022 12:26:21 +0100
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <svvhct$mmt$3@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>
<svksmc$j3p$1@dont-email.me>
<chine.bleu-67679C.07200502032022@reader.eternal-september.org>
<svo5uu$r3f$1@dont-email.me> <svogun$rrr$1@dont-email.me>
<3b8b38c9-57a8-4138-a08f-98951651fc18n@googlegroups.com>
<87mti7nb1o.fsf@nosuchdomain.example.com> <svr4gr$8cc$1@dont-email.me>
<svrpao$1pv2$1@gioia.aioe.org> <svslgv$ss7$1@dont-email.me>
<svsnd6$dh0$1@dont-email.me> <svt4g5$440$1@dont-email.me>
<slrnt248o6.k2j.dan@djph.net> <svt9hc$il8$1@dont-email.me>
<slrnt24d0n.k2j.dan@djph.net> <874k4d8ojg.fsf@tigger.extechop.net>
<svuca0$f70$1@dont-email.me>
<chine.bleu-1ABAF2.17492704032022@reader.eternal-september.org>
<svuml5$efk$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 5 Mar 2022 11:26:21 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="f451f40debc5b0a2519079f7c10763d3";
logging-data="23261"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/e3kWXHNOFbTeweajj6QcuQVvJFiSEEek="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:uQVQQHcSbbQaeefZ95XQkSXs96M=
In-Reply-To: <svuml5$efk$2@dont-email.me>
Content-Language: en-GB
 by: David Brown - Sat, 5 Mar 2022 11:26 UTC

On 05/03/2022 04:49, Lynn McGuire wrote:
> On 3/4/2022 7:49 PM, Siri Cruise wrote:
>> In article <svuca0$f70$1@dont-email.me>,
>>   Lynn McGuire <lynnmcguire5@gmail.com> wrote:
>>
>>> And ERCOT in Texas tells people to not run their clocks based on the
>>
>> So Texas supplies residential and business customer DC instead of
>> AC? Do they also replace on devices expecting AC?
>
> There is no residential DC in Texas that I know of.  Most of the DC
> grids around the world are for old electric train systems as modern
> electric train systems run on AC.
>

DC grids are also used for longer distance and higher power, because
they are significantly more efficient than AC. However, they are more
complex to switch on and off, or to transform the voltages. But you
don't need to synchronise the phase and frequency between generators.

Of course, you can't then use the line frequency for your clocks!

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

<svvhi1$mmt$4@dont-email.me>

  copy mid

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

  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: Sat, 5 Mar 2022 12:29:05 +0100
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <svvhi1$mmt$4@dont-email.me>
References: <svjioa$afj$1@dont-email.me> <svksmc$j3p$1@dont-email.me>
<chine.bleu-67679C.07200502032022@reader.eternal-september.org>
<svo5uu$r3f$1@dont-email.me> <svogun$rrr$1@dont-email.me>
<3b8b38c9-57a8-4138-a08f-98951651fc18n@googlegroups.com>
<87mti7nb1o.fsf@nosuchdomain.example.com> <svr4gr$8cc$1@dont-email.me>
<svrpao$1pv2$1@gioia.aioe.org> <svslgv$ss7$1@dont-email.me>
<svsnd6$dh0$1@dont-email.me> <svt4g5$440$1@dont-email.me>
<slrnt248o6.k2j.dan@djph.net> <svt9hc$il8$1@dont-email.me>
<SCqUJ.91133$Lbb6.64261@fx45.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 5 Mar 2022 11:29:05 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="f451f40debc5b0a2519079f7c10763d3";
logging-data="23261"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+erVjuvH6rGkLgmZDb78kArVCPQWXwu/I="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:jZEMNPUileuT/kkRyQee2AD7rg0=
In-Reply-To: <SCqUJ.91133$Lbb6.64261@fx45.iad>
Content-Language: en-GB
 by: David Brown - Sat, 5 Mar 2022 11:29 UTC

On 04/03/2022 16:54, Scott Lurndal wrote:
> David Brown <david.brown@hesbynett.no> writes:
>> On 04/03/2022 15:31, Dan Purgert wrote:
>>> David Brown wrote:
>>>> [...]
>>>> But any kind of data reception - radio, power-line, whatever - costs
>>>> money, power, space and complexity at the receiving end. Counting AC
>>>> cycles is by far the cheapest and simplest solution when you are plugged
>>>> in, and is stable over the long term but has no absolute reference.
>>>
>>> And my microwave doesn't need an absolute reference either.
>>>
>>> Honestly though, even using the AC line sounds like its adding
>>> complexity for little (or no) benefit to my oven/microwave/etc. Also,
>>> how's it gonna handle different line frequency? As a manufacturer, am I
>>> gonna need half a dozen different designs of the same product to
>>> accommodate line frequency?
>>
>> There are only two frequencies used - 50 Hz and 60 Hz. It's not hard to
>> make automatic detection of which of these you are seeing, as you always
>> have some kind of frequency reference for your microcontroller.
>
> Although with modern switching power supplies, the AC mains frequency is
> pretty much irrelevent and certainly not visible downstream of the
> power supply.
>

You don't use it for things plugged into small DC power supplies - you
use it in things that use higher power, such as the ovens and microwaves
that were mentioned.

It is possible to have an antenna in your DC-powered (or battery
powered) equipment to pick up the 50/60 Hz "hum" that is found anywhere
that mains electricity is used, but I haven't seen that as a technique
for timing reference.

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

<slrnt26mlp.k2j.dan@djph.net>

  copy mid

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

  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: Sat, 5 Mar 2022 12:41:44 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <slrnt26mlp.k2j.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>
<chine.bleu-2F5314.23105028022022@reader.eternal-september.org>
<svksmc$j3p$1@dont-email.me>
<chine.bleu-67679C.07200502032022@reader.eternal-september.org>
<svo5uu$r3f$1@dont-email.me> <svogun$rrr$1@dont-email.me>
<3b8b38c9-57a8-4138-a08f-98951651fc18n@googlegroups.com>
<87mti7nb1o.fsf@nosuchdomain.example.com> <svr4gr$8cc$1@dont-email.me>
<svrpao$1pv2$1@gioia.aioe.org> <svslgv$ss7$1@dont-email.me>
<svsnd6$dh0$1@dont-email.me> <svt4g5$440$1@dont-email.me>
<slrnt248o6.k2j.dan@djph.net> <svt9hc$il8$1@dont-email.me>
<slrnt24d0n.k2j.dan@djph.net> <874k4d8ojg.fsf@tigger.extechop.net>
Injection-Date: Sat, 5 Mar 2022 12:41:44 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="19e7d3349f4db823c5af60a1078d3f97";
logging-data="21788"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19rJ4VRrK9a6tqoIbesHeg+dpqOKD8fgRQ="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:rSkW2wtMcWrEy87IgBVKNZiV58E=
X-PGP-KeyID: 0x4CE72860
 by: Dan Purgert - Sat, 5 Mar 2022 12:41 UTC

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

Otto J. Makela wrote:
> Dan Purgert <dan@djph.net> wrote:
>
>> I guess we can say I've lost the plot somewhere then -- I just can't
>> piece together how this would improve "timekeeping" on a device
>> plugged into the mains.
>
> The mains frequency is a rather good timebase: the base frequency (be it
> 50 or 60 Hz) is very rigidly maintained, because otherwise the whole
> interconnected power network would very quickly fall apart.

Okay, so it's what I had thought - it's "just another clock source" in
addition to whatever crystal oscillator (etc.) source that a
microcontroller is (likely) already using.

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

iQIzBAEBCgAdFiEE3asj+xn6fYUcweBnbWVw5UznKGAFAmIjWrkACgkQbWVw5Uzn
KGDsOQ//XGfSsTHKV4M9hs4VISIe01fWC52AEqW95YccO+e4S4gtsh2zMTObYYhV
3PKrn23A0MTCaqNgQeBz1NsKJ+wIOLNjwH4mSrFJI1bjUWxwVTpGKy+rwoilzS2/
sACgjWStwWQUfUu4Z9/D9uDs+Wsvkxf1EQlBj5wImbYo9+8nPPjFKJJIkEaDMd2F
aaSnZkYNX1IEu1BFUn6yM1kCj6QZo7p1oTJ8R7abBBKAAdqgEk7kwmcOsuKgTaoO
OIvNohkkmPY1SKognPi7JLAareA9++qeqJmuv/WKysEOlT6J7sdBlGp7gVxlw6QB
P17G3BO+6l1HEp7MHBUrNFI8WTmgouqP/FS4ZA2SUmJ2yQIHdI9rXCFoiuo743vy
FwiMIghjgkUatKxDnobW/it1qOEGmVJMyUV/rEcuAD2Xa6Mq/+XvF4zIzjnhmLAv
jMFi/xf9oN7cEAJHeiUHV+4FXHIT5HCqcenuHu7E8peoDGTw9HeQiG3eEHekr31w
G0f0xFSkB5Q544D9gnGsxF/5STLKnZ9Yo4p/NZXkQw1XJJXM8qewaln4Wm2FswiK
TzhlSTn/I4hGbOLE2cjuwn6epS+35nQClVD8npow8B+XTGNpWiKa3SOhMdDwdNFu
iOR0+5/H8V9/EhW7nehA24UMPV9M/Cf9qLHb5REX0HBkSgrQgo8=
=jQzU
-----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

<qTLUJ.56115$oF2.49045@fx10.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx10.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> <svr4gr$8cc$1@dont-email.me> <svrpao$1pv2$1@gioia.aioe.org> <svslgv$ss7$1@dont-email.me> <svsnd6$dh0$1@dont-email.me> <svt4g5$440$1@dont-email.me> <slrnt248o6.k2j.dan@djph.net> <svt9hc$il8$1@dont-email.me> <slrnt24d0n.k2j.dan@djph.net> <874k4d8ojg.fsf@tigger.extechop.net> <chine.bleu-4E5C72.15072804032022@reader.eternal-september.org> <nnd$0ce3b333$1344114e@5e8aa6fcc0002811> <chine.bleu-FCD47A.17535404032022@reader.eternal-september.org>
Lines: 17
Message-ID: <qTLUJ.56115$oF2.49045@fx10.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Sat, 05 Mar 2022 16:05:42 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Sat, 05 Mar 2022 16:05:42 GMT
X-Received-Bytes: 1793
 by: Scott Lurndal - Sat, 5 Mar 2022 16:05 UTC

Siri Cruise <chine.bleu@yahoo.com> writes:
>In article <nnd$0ce3b333$1344114e@5e8aa6fcc0002811>,
> Stef <me@this.is.invalid> wrote:
>
>> > How can that be true? All the experts are chiming in that it's
>> > impossible to have a stanardised and rigidly adhered to anything
>> > about the grid.
>>
>> Mains frequency is tightly controlled:
>
>No shit. But what about all the experts who chimed in that
>message passing on an AC grid was impossible because all the
>different operators made it too chaotic?

because there is _no_ message being passed. It's just a
constant frequency reference - a clock with no hands that
ticks 50 or 60 times a second.

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

<t02ep5$19k6p$2@news.xmission.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.lang.c
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Sun, 6 Mar 2022 14:00:05 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <t02ep5$19k6p$2@news.xmission.com>
References: <svjioa$afj$1@dont-email.me> <874k4d8ojg.fsf@tigger.extechop.net> <svuca0$f70$1@dont-email.me> <chine.bleu-1ABAF2.17492704032022@reader.eternal-september.org>
Injection-Date: Sun, 6 Mar 2022 14:00:05 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="1364185"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Sun, 6 Mar 2022 14:00 UTC

In article <chine.bleu-1ABAF2.17492704032022@reader.eternal-september.org>,
Siri Cruise <chine.bleu@yahoo.com> wrote:
>In article <svuca0$f70$1@dont-email.me>,
> Lynn McGuire <lynnmcguire5@gmail.com> wrote:
>
>> And ERCOT in Texas tells people to not run their clocks based on the
>
>So Texas supplies residential and business customer DC instead of
>AC? Do they also replace on devices expecting AC?

Yes, Texas is totally screwed up (and Texans totally screwed) when it comes
to electricity distribution.

But they aren't (quite) *that* screwed up (as to mistakenly supply DC).

Yet...

--
You are again heaping damnation upon your own head by your statements.

- Rick C Hodgin -

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

<t08hra$v3v$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: vir.camp...@invalid.invalid (Vir Campestris)
Newsgroups: comp.lang.c
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Tue, 8 Mar 2022 21:29:14 +0000
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <t08hra$v3v$1@dont-email.me>
References: <svjioa$afj$1@dont-email.me> <svr4gr$8cc$1@dont-email.me>
<svrpao$1pv2$1@gioia.aioe.org> <svrq45$71k$1@dont-email.me>
<svsjh3$16oh5$1@news.xmission.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 8 Mar 2022 21:29:14 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="f2b3d8a9705fa109293767d196221db1";
logging-data="31871"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+87VXyn0mXJt4jRmazO5dYpcQ//J14UW0="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.5.0
Cancel-Lock: sha1:qmCVI55UTqAy+DbKstCROsVGE64=
In-Reply-To: <svsjh3$16oh5$1@news.xmission.com>
Content-Language: en-GB
 by: Vir Campestris - Tue, 8 Mar 2022 21:29 UTC

On 04/03/2022 08:44, Kenny McCormack wrote:
> Yeah, but that's Texas.
>
> We now know (if we didn't already) with absolute certainty that Texas is
> weird and weirdly incompetent when it comes to electricity distribution and
> related topics.
>
> So, I'm not surprised they do it some weird way. Probably do it that way
> just to "own the libs".

I'm in the UK, and the smart meters use the mobile phone system.
(Cellphone in American)

Except where I live if I want to make a call I have to go outside, and
stand very still.

This is a really remote area of course. We're over 10 miles from the
centre of Cambridge.

They did suggest a smart meter. I explained. They checked and told me
"yes, we have had some installation failures in your area".

Apparently 92% of the UK has coverage from at least one operator. My
operator thinks I have good coverage inside the house and out.

Andy

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

<t08i1n$189$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: vir.camp...@invalid.invalid (Vir Campestris)
Newsgroups: comp.lang.c
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Tue, 8 Mar 2022 21:32:39 +0000
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <t08i1n$189$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>
<svksmc$j3p$1@dont-email.me>
<chine.bleu-67679C.07200502032022@reader.eternal-september.org>
<svo5uu$r3f$1@dont-email.me> <svogun$rrr$1@dont-email.me>
<3b8b38c9-57a8-4138-a08f-98951651fc18n@googlegroups.com>
<87mti7nb1o.fsf@nosuchdomain.example.com> <svr4gr$8cc$1@dont-email.me>
<svrpao$1pv2$1@gioia.aioe.org> <svslgv$ss7$1@dont-email.me>
<svsnd6$dh0$1@dont-email.me> <svt4g5$440$1@dont-email.me>
<slrnt248o6.k2j.dan@djph.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 8 Mar 2022 21:32:39 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="f2b3d8a9705fa109293767d196221db1";
logging-data="1289"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+b0jEWZXCWkfuQXhZIhRZ0tCcNLJqZfF8="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.5.0
Cancel-Lock: sha1:y+nLDCRTUd5jC+6N70k4opxte6o=
In-Reply-To: <slrnt248o6.k2j.dan@djph.net>
Content-Language: en-GB
 by: Vir Campestris - Tue, 8 Mar 2022 21:32 UTC

On 04/03/2022 14:31, Dan Purgert wrote:
> And my microwave doesn't need an absolute reference either.
>
> Honestly though, even using the AC line sounds like its adding
> complexity for little (or no) benefit to my oven/microwave/etc. Also,
> how's it gonna handle different line frequency? As a manufacturer, am I
> gonna need half a dozen different designs of the same product to
> accommodate line frequency?

Let's see, one each for 110V and 230V; and one each for 50 and 60Hz.

Four.

Which they already do. Along with variations for the number of mains
plugs, of which there are a far higher number.

My microwave was built on the wrong side of Japan; the turntable spins 5
times a minute on our 50Hz, which means anything normal under a minute
isn't a whole number of turns and your handle is at the back.

I'm sure it would be OK on 60Hz, and 10 seconds would be a whole turn.

Andy

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

<lPQVJ.56509$Y1A7.3654@fx43.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx43.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> <svksmc$j3p$1@dont-email.me> <chine.bleu-67679C.07200502032022@reader.eternal-september.org> <svo5uu$r3f$1@dont-email.me> <svogun$rrr$1@dont-email.me> <3b8b38c9-57a8-4138-a08f-98951651fc18n@googlegroups.com> <87mti7nb1o.fsf@nosuchdomain.example.com> <svr4gr$8cc$1@dont-email.me> <svrpao$1pv2$1@gioia.aioe.org> <svslgv$ss7$1@dont-email.me> <svsnd6$dh0$1@dont-email.me> <svt4g5$440$1@dont-email.me> <slrnt248o6.k2j.dan@djph.net> <t08i1n$189$1@dont-email.me>
Lines: 17
Message-ID: <lPQVJ.56509$Y1A7.3654@fx43.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Tue, 08 Mar 2022 22:31:45 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Tue, 08 Mar 2022 22:31:45 GMT
X-Received-Bytes: 1830
 by: Scott Lurndal - Tue, 8 Mar 2022 22:31 UTC

Vir Campestris <vir.campestris@invalid.invalid> writes:
>On 04/03/2022 14:31, Dan Purgert wrote:
>> And my microwave doesn't need an absolute reference either.
>>
>> Honestly though, even using the AC line sounds like its adding
>> complexity for little (or no) benefit to my oven/microwave/etc. Also,
>> how's it gonna handle different line frequency? As a manufacturer, am I
>> gonna need half a dozen different designs of the same product to
>> accommodate line frequency?
>
>Let's see, one each for 110V and 230V; and one each for 50 and 60Hz.
>
>Four.

One. With a jumper on the PCB that selects the target market,
set at manufacturing time. It's not rocket science.

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

<20220310120748.935@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: 480-992-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Thu, 10 Mar 2022 20:08:12 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <20220310120748.935@kylheku.com>
References: <svjioa$afj$1@dont-email.me> <svksmc$j3p$1@dont-email.me>
<chine.bleu-67679C.07200502032022@reader.eternal-september.org>
<svo5uu$r3f$1@dont-email.me> <svogun$rrr$1@dont-email.me>
<3b8b38c9-57a8-4138-a08f-98951651fc18n@googlegroups.com>
<87mti7nb1o.fsf@nosuchdomain.example.com> <svr4gr$8cc$1@dont-email.me>
<svrpao$1pv2$1@gioia.aioe.org> <svslgv$ss7$1@dont-email.me>
<svsnd6$dh0$1@dont-email.me> <svt4g5$440$1@dont-email.me>
<slrnt248o6.k2j.dan@djph.net> <t08i1n$189$1@dont-email.me>
<lPQVJ.56509$Y1A7.3654@fx43.iad>
Injection-Date: Thu, 10 Mar 2022 20:08:12 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="f70b547cbc89c46064d97b01c719c494";
logging-data="24325"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/LRoduY49S+nn8SM91UiOSMU05c1LO7bo="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:7AVwF1y9r2BDy+iAx1n2juExNt0=
 by: Kaz Kylheku - Thu, 10 Mar 2022 20:08 UTC

On 2022-03-08, Scott Lurndal <scott@slp53.sl.home> wrote:
> Vir Campestris <vir.campestris@invalid.invalid> writes:
>>On 04/03/2022 14:31, Dan Purgert wrote:
>>> And my microwave doesn't need an absolute reference either.
>>>
>>> Honestly though, even using the AC line sounds like its adding
>>> complexity for little (or no) benefit to my oven/microwave/etc. Also,
>>> how's it gonna handle different line frequency? As a manufacturer, am I
>>> gonna need half a dozen different designs of the same product to
>>> accommodate line frequency?
>>
>>Let's see, one each for 110V and 230V; and one each for 50 and 60Hz.
>>
>>Four.
>
> One. With a jumper on the PCB that selects the target market,

Or when you move, taking your appliances from West Japan to East Japan
or vice versa. :)

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

<3RtWJ.127092$aT3.53231@fx09.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!peer03.ams4!peer.am4.highwinds-media.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx09.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> <svo5uu$r3f$1@dont-email.me> <svogun$rrr$1@dont-email.me> <3b8b38c9-57a8-4138-a08f-98951651fc18n@googlegroups.com> <87mti7nb1o.fsf@nosuchdomain.example.com> <svr4gr$8cc$1@dont-email.me> <svrpao$1pv2$1@gioia.aioe.org> <svslgv$ss7$1@dont-email.me> <svsnd6$dh0$1@dont-email.me> <svt4g5$440$1@dont-email.me> <slrnt248o6.k2j.dan@djph.net> <t08i1n$189$1@dont-email.me> <lPQVJ.56509$Y1A7.3654@fx43.iad> <20220310120748.935@kylheku.com>
Lines: 23
Message-ID: <3RtWJ.127092$aT3.53231@fx09.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Thu, 10 Mar 2022 21:12:31 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Thu, 10 Mar 2022 21:12:31 GMT
X-Received-Bytes: 2119
 by: Scott Lurndal - Thu, 10 Mar 2022 21:12 UTC

Kaz Kylheku <480-992-1380@kylheku.com> writes:
>On 2022-03-08, Scott Lurndal <scott@slp53.sl.home> wrote:
>> Vir Campestris <vir.campestris@invalid.invalid> writes:
>>>On 04/03/2022 14:31, Dan Purgert wrote:
>>>> And my microwave doesn't need an absolute reference either.
>>>>
>>>> Honestly though, even using the AC line sounds like its adding
>>>> complexity for little (or no) benefit to my oven/microwave/etc. Also,
>>>> how's it gonna handle different line frequency? As a manufacturer, am I
>>>> gonna need half a dozen different designs of the same product to
>>>> accommodate line frequency?
>>>
>>>Let's see, one each for 110V and 230V; and one each for 50 and 60Hz.
>>>
>>>Four.
>>
>> One. With a jumper on the PCB that selects the target market,
>
>Or when you move, taking your appliances from West Japan to East Japan
>or vice versa. :)

Although most switching power supplies work seemlessly with 50-60hz
and 110-240vac.

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

<t0drd2$np6$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: vir.camp...@invalid.invalid (Vir Campestris)
Newsgroups: comp.lang.c
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Thu, 10 Mar 2022 21:42:58 +0000
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <t0drd2$np6$2@dont-email.me>
References: <svjioa$afj$1@dont-email.me> <svo5uu$r3f$1@dont-email.me>
<svogun$rrr$1@dont-email.me>
<3b8b38c9-57a8-4138-a08f-98951651fc18n@googlegroups.com>
<87mti7nb1o.fsf@nosuchdomain.example.com> <svr4gr$8cc$1@dont-email.me>
<svrpao$1pv2$1@gioia.aioe.org> <svslgv$ss7$1@dont-email.me>
<svsnd6$dh0$1@dont-email.me> <svt4g5$440$1@dont-email.me>
<slrnt248o6.k2j.dan@djph.net> <t08i1n$189$1@dont-email.me>
<lPQVJ.56509$Y1A7.3654@fx43.iad> <20220310120748.935@kylheku.com>
<3RtWJ.127092$aT3.53231@fx09.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 10 Mar 2022 21:42:58 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="e07052405dc28bfe430e368cebff4851";
logging-data="24358"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX186AbGsHBVLTMhubcCKvty806jilJm+Dx8="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.5.0
Cancel-Lock: sha1:7l3iCaIGqbpTWh9qMezfJL+nLhc=
In-Reply-To: <3RtWJ.127092$aT3.53231@fx09.iad>
Content-Language: en-GB
 by: Vir Campestris - Thu, 10 Mar 2022 21:42 UTC

On 10/03/2022 21:12, Scott Lurndal wrote:
> Kaz Kylheku <480-992-1380@kylheku.com> writes:
>> On 2022-03-08, Scott Lurndal <scott@slp53.sl.home> wrote:
>>> Vir Campestris <vir.campestris@invalid.invalid> writes:
>>>> On 04/03/2022 14:31, Dan Purgert wrote:
>>>>> And my microwave doesn't need an absolute reference either.
>>>>>
>>>>> Honestly though, even using the AC line sounds like its adding
>>>>> complexity for little (or no) benefit to my oven/microwave/etc. Also,
>>>>> how's it gonna handle different line frequency? As a manufacturer, am I
>>>>> gonna need half a dozen different designs of the same product to
>>>>> accommodate line frequency?
>>>>
>>>> Let's see, one each for 110V and 230V; and one each for 50 and 60Hz.
>>>>
>>>> Four.
>>>
>>> One. With a jumper on the PCB that selects the target market,
>>
>> Or when you move, taking your appliances from West Japan to East Japan
>> or vice versa. :)
>
> Although most switching power supplies work seemlessly with 50-60hz
> and 110-240vac.

Most, but by no means all.

I have a 240v-110V transformer sitting on the floor next to me so I can
work from home with 110V only devices. The office has a 110V _and_ a
240V mains supply.

And yes, some do let out the magic smoke if you put a 110V device on a
240V supply.

50-60Hz hasn't been a problem for us, though I understand it can be for
motors.

Andy

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

<t3hb4u$lfh$1@dont-email.me>

  copy mid

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

  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: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c,comp.lang.c++
Subject: Re: "Year 2038 problem is still alive and well" by CookiePLMonster
Date: Sun, 17 Apr 2022 17:19:06 +0200
Organization: A noiseless patient Spider
Lines: 514
Message-ID: <t3hb4u$lfh$1@dont-email.me>
References: <svjioa$afj$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 17 Apr 2022 15:18:54 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="22cdc50e98bfff060b5f6dc687099198";
logging-data="22001"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+eZOajhrnP3rcQXmvb1kbvd19GF4RBRYc="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.8.0
Cancel-Lock: sha1:QzrvYBXUwf1RfAVQ3ZbgUHLpXkU=
In-Reply-To: <svjioa$afj$1@dont-email.me>
Content-Language: de-DE
 by: Bonita Montero - Sun, 17 Apr 2022 15:19 UTC

I think Window's FILETIME and SYSTEM_TIME are the most elegant ways
to handle date-arithmetics. I've implemented this platform-independent
in C++:

// system_time.h:

#pragma once
#if defined(_MSC_VER)
#define NOMINMAX
#include <Windows.h>
#endif
#include <cstdint>
#include <compare>
#include <ctime>
#include <stdexcept>
#include <compare>

#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable: 26812) // prefer enum class over enum
#endif

struct system_time_t
{ std::uint16_t year;
std::uint8_t weekday, month, day;
std::uint8_t hour, minute, second;
std::uint32_t ns100;
};

struct system_time : public system_time_t
{ system_time() {}
system_time( system_time const & ) = default;
system_time( std::uint16_t year, 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 );
system_time( struct tm const &tm );
#if defined(_MSC_VER)
system_time( SYSTEMTIME const &st );
#endif
operator std::uint64_t() const;
system_time &operator =( std::uint64_t timestamp );
system_time &operator =( system_time const & ) = default;
operator tm() const;
system_time &operator =( struct tm const &tm );
#if defined(_MSC_VER)
operator SYSTEMTIME() const;
system_time &operator =( SYSTEMTIME const &st );
#endif
void adjust_weekday();
static std::uint8_t get_weekday( std::uint64_t timestamp );
static_assert(sizeof(time_t) == 8, "time_t must be 64 bit");
static time_t timestamp_to_time_t( uint64_t timestamp );
static uint64_t time_t_to_timestamp( time_t time );
struct date_error : public std::invalid_argument
{
enum reason_t : uint8_t
{
TIMESTAMP_BEYOND_63_BIT = 1,
YEAR_OUT_OF_RANGE,
MONTH_OUT_OF_RANGE,
DAY_OUT_OF_RANGE,
HOUR_OUT_OF_RANGE,
MINUTE_OUT_OF_RANGE,
SECOND_OUT_OF_RANGE,
NS100_OUT_OF_RANGE,
INVALID_WEEKDAY,
TIMESTAMP_BEFORE_TIME_T
};
reason_t reason();
private:
friend struct system_time;
date_error( reason_t reason );
reason_t m_reason;
};
private:
void assignFileTime( 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,
TIME_T_IN_TIMESTAMP_BEGIN = 0x19DB1DED53E800,
LAST_TIMESTAMP_IN_TIME_T = 0xD69433CCD5;
};

// may throw invalid_argument

inline
system_time::system_time( std::uint64_t timestamp )
{ assignFileTime( timestamp );
}

// may throw invalid_argument

inline
system_time &system_time::operator =( std::uint64_t timestamp )
{ assignFileTime( timestamp );
return *this;
}

inline
system_time::system_time( struct tm const &tm )
{ *this = tm;
}

#if defined(_MSC_VER)
inline
system_time::system_time( SYSTEMTIME const &st )
{ *this = st;
} #endif

inline
typename system_time::date_error::reason_t system_time::date_error::reason()
{ return m_reason;
}

// may throw date_error

inline
void system_time::adjust_weekday()
{ weekday = get_weekday( (uint64_t)*this );
}

inline
uint8_t system_time::get_weekday( uint64_t timestamp )
{ return (std::uint32_t)((timestamp - timestamp / WEEK * WEEK) / DAY + 1)
% 7;
}

// may throw date_error

inline
std::strong_ordering operator <=>( system_time_t const &left,
system_time_t const &right )
{ return (uint64_t)(system_time const &)left <=> (uint64_t)(system_time
const &)right;
}

// may throw date_error

inline
std::strong_ordering operator <=>( system_time_t const &left,
std::uint64_t right )
{ return (uint64_t)(system_time const &)left <=> right;
}

// may throw date_error

inline
std::strong_ordering operator <=>( std::uint64_t left, system_time_t
const &right )
{ return left <=> (uint64_t)(system_time const &)right;
}

#if defined(_MSC_VER)
#pragma warning(pop)
#endif

// system_time.cpp

#include <stdexcept>
#include <cassert>
#include <limits>
#include <algorithm>
#include <array>
#include <system_error>
#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 SYSTEM_TIME_BINARY_SEARCH

// may throw date_error

system_time::system_time( std::uint16_t year, 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->month = month;
this->day = day;
this->hour = hour;
this->minute = minute;
this->second = second;
this->ns100 = ns100;
this->weekday = get_weekday( (uint64_t)*this );
}

// may throw date_error

void system_time::assignFileTime( uint64_t timestamp )
{ if( timestamp > (uint64_t)numeric_limits<int64_t>::max() )
throw date_error( date_error::TIMESTAMP_BEYOND_63_BIT );
weekday = get_weekday( timestamp );
timestamp += LEAP_YEAR; // 1601 - 1600 = leap year
uint64_t tsCalc = timestamp;
uint16_t y400, y100, y4, y;
y400 = (uint16_t)(tsCalc / FOUR_HUNDRED_YEARS);
tsCalc -= y400 * FOUR_HUNDRED_YEARS;
bool isLeapYear;
auto leapQuad = [&]()
{
if( tsCalc >= LEAP_YEAR ) [[likely]]
// y >= 1
tsCalc -= LEAP_YEAR,
y = (uint16_t)(1 + tsCalc / NON_LEAP_YEAR), // 1 ... 3
tsCalc -= tsCalc / NON_LEAP_YEAR * NON_LEAP_YEAR,
isLeapYear = false;
else
// y == 0
y = 0,
isLeapYear = 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,
isLeapYear = 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[isLeapYear];
#if defined(SYSTEM_TIME_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;
}

// may throw date_error

system_time::operator std::uint64_t() const
{ if( year < 1601 || year > 30828 ) [[unlikely]]
throw date_error( date_error::YEAR_OUT_OF_RANGE );
if( month < 1 || month > 12 ) [[unlikely]]
throw date_error( date_error::MONTH_OUT_OF_RANGE );
bool isLeapYear = year % 4 == 0 && year % 100 != 0 || year % 400 == 0;
static
uint8_t const alignas(CL_SIZE) monthLengths[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 > monthLengths[isLeapYear][month] ) [[unlikely]]
throw date_error( date_error::DAY_OUT_OF_RANGE );
if( hour >= 24 ) [[unlikely]]
throw date_error( date_error::HOUR_OUT_OF_RANGE );
if( minute >= 60 ) [[unlikely]]
throw date_error( date_error::MINUTE_OUT_OF_RANGE );
if( second >= 60 ) [[unlikely]]
throw date_error( date_error::SECOND_OUT_OF_RANGE );
if( ns100 >= 10'000'000 ) [[unlikely]]
throw date_error( date_error::NS100_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;
if( timestamp > (uint64_t)numeric_limits<int64_t>::max() )
throw date_error( date_error::NS100_OUT_OF_RANGE );
return timestamp;
}


Click here to read the complete article
Pages:1234
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor