Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.fortran > #73915 > unrolled thread
| Started by | Lynn McGuire <lynnmcguire5@gmail.com> |
|---|---|
| First post | 2022-11-11 14:29 -0600 |
| Last post | 2022-11-13 13:23 +0000 |
| Articles | 20 on this page of 29 — 15 participants |
Back to article view | Back to comp.lang.fortran
xkcd: Y2K and 2038 Lynn McGuire <lynnmcguire5@gmail.com> - 2022-11-11 14:29 -0600
Re: xkcd: Y2K and 2038 Robin Vowels <robin.vowels@gmail.com> - 2022-11-11 20:31 -0800
Re: xkcd: Y2K and 2038 Thomas Koenig <tkoenig@netcologne.de> - 2022-11-12 07:36 +0000
Re: xkcd: Y2K and 2038 Lynn McGuire <lynnmcguire5@gmail.com> - 2022-11-12 01:58 -0600
Re: xkcd: Y2K and 2038 Thomas Koenig <tkoenig@netcologne.de> - 2022-11-12 08:30 +0000
Re: xkcd: Y2K and 2038 Muttley@dastardlyhq.com - 2022-11-12 10:00 +0000
Re: xkcd: Y2K and 2038 David Brown <david.brown@hesbynett.no> - 2022-11-12 11:29 +0100
Re: xkcd: Y2K and 2038 FortranFan <parekhvs@gmail.com> - 2022-11-12 06:49 -0800
Re: xkcd: Y2K and 2038 scott@slp53.sl.home (Scott Lurndal) - 2022-11-12 16:05 +0000
Re: xkcd: Y2K and 2038 gah4 <gah4@u.washington.edu> - 2022-11-12 10:46 -0800
Re: xkcd: Y2K and 2038 Thomas Koenig <tkoenig@netcologne.de> - 2022-11-12 19:30 +0000
Re: xkcd: Y2K and 2038 gah4 <gah4@u.washington.edu> - 2022-11-12 11:56 -0800
Re: xkcd: Y2K and 2038 Thomas Koenig <tkoenig@netcologne.de> - 2022-11-12 23:45 +0000
Re: xkcd: Y2K and 2038 Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-11-12 18:00 -0800
Re: xkcd: Y2K and 2038 gah4 <gah4@u.washington.edu> - 2022-11-12 18:08 -0800
Re: xkcd: Y2K and 2038 red floyd <no.spam.here@its.invalid> - 2022-11-13 09:49 -0800
Re: xkcd: Y2K and 2038 gazelle@shell.xmission.com (Kenny McCormack) - 2022-11-14 09:14 +0000
Re: xkcd: Y2K and 2038 David Brown <david.brown@hesbynett.no> - 2022-11-14 10:09 +0100
Re: xkcd: Y2K and 2038 gah4 <gah4@u.washington.edu> - 2022-11-14 01:54 -0800
Re: xkcd: Y2K and 2038 Gary Scott <garylscott@sbcglobal.net> - 2022-11-14 09:41 -0600
Re: xkcd: Y2K and 2038 Thomas Koenig <tkoenig@netcologne.de> - 2022-11-14 14:09 +0000
Re: xkcd: Y2K and 2038 Klaus Wacker <klaus.w.wacker@t-online.de> - 2022-11-14 13:47 +0000
Re: xkcd: Y2K and 2038 Robin Vowels <robin.vowels@gmail.com> - 2022-12-02 05:53 -0800
Re: xkcd: Y2K and 2038 Robin Vowels <robin.vowels@gmail.com> - 2022-11-12 00:02 -0800
Re: xkcd: Y2K and 2038 Paavo Helde <eesnimi@osa.pri.ee> - 2022-11-12 16:13 +0200
Re: xkcd: Y2K and 2038 Siri Cruise <chine.bleu@yahoo.com> - 2022-11-12 15:49 -0700
Re: xkcd: Y2K and 2038 Siri Cruise <chine.bleu@yahoo.com> - 2022-11-12 15:47 -0700
Re: xkcd: Y2K and 2038 Klaus Wacker <klaus.w.wacker@t-online.de> - 2022-11-13 12:45 +0000
Re: xkcd: Y2K and 2038 Klaus Wacker <klaus.w.wacker@t-online.de> - 2022-11-13 13:23 +0000
Page 1 of 2 [1] 2 Next page →
| From | Lynn McGuire <lynnmcguire5@gmail.com> |
|---|---|
| Date | 2022-11-11 14:29 -0600 |
| Subject | xkcd: Y2K and 2038 |
| Message-ID | <tkmbc4$uc0u$1@dont-email.me> |
xkcd: Y2K and 2038
https://xkcd.com/2697/
It shouldn't cost more than a trillion dollars or two to investigate this.
Explained at:
https://www.explainxkcd.com/wiki/index.php/2697:_Y2K_and_2038
Lynn
[toc] | [next] | [standalone]
| From | Robin Vowels <robin.vowels@gmail.com> |
|---|---|
| Date | 2022-11-11 20:31 -0800 |
| Message-ID | <2226ccf5-6b1d-47a4-86b8-49bd03330a46n@googlegroups.com> |
| In reply to | #73915 |
On Saturday, November 12, 2022 at 7:30:00 AM UTC+11, Lynn McGuire wrote: > xkcd: Y2K and 2038 > https://xkcd.com/2697/ > > It shouldn't cost more than a trillion dollars or two to investigate this. > > Explained at: > https://www.explainxkcd.com/wiki/index.php/2697:_Y2K_and_2038 . PL/I uses a double word float. It handled the Y2K problem with minimal changes to programs. . Banks didn't learn anything from Y2K: they still use 2-digit years.
[toc] | [prev] | [next] | [standalone]
| From | Thomas Koenig <tkoenig@netcologne.de> |
|---|---|
| Date | 2022-11-12 07:36 +0000 |
| Message-ID | <tknieo$36gkg$2@newsreader4.netcologne.de> |
| In reply to | #73915 |
Lynn McGuire <lynnmcguire5@gmail.com> schrieb: > xkcd: Y2K and 2038 > https://xkcd.com/2697/ > > It shouldn't cost more than a trillion dollars or two to investigate this. The switchover to 64-bit systems should have done this. Not sure that this cost a trillion dollars, but computers usually have a limited lifetime, so they had to be replaced anyway.
[toc] | [prev] | [next] | [standalone]
| From | Lynn McGuire <lynnmcguire5@gmail.com> |
|---|---|
| Date | 2022-11-12 01:58 -0600 |
| Message-ID | <tknjnl$k9o$1@gioia.aioe.org> |
| In reply to | #73925 |
On 11/12/2022 1:36 AM, Thomas Koenig wrote:
> Lynn McGuire <lynnmcguire5@gmail.com> schrieb:
>> xkcd: Y2K and 2038
>> https://xkcd.com/2697/
>>
>> It shouldn't cost more than a trillion dollars or two to investigate this.
>
> The switchover to 64-bit systems should have done this. Not sure
> that this cost a trillion dollars, but computers usually have a
> limited lifetime, so they had to be replaced anyway.
Most software is still 32 bit. Having the operating system as 64 bit
helps but it does not solve the problem of the 32 bit software running
on it. An unsigned 32 bit integer only gets us to 2106.
https://en.wikipedia.org/wiki/Year_2038_problem
Porting software to 64 bit is a tremendous work for most software.
Lynn
[toc] | [prev] | [next] | [standalone]
| From | Thomas Koenig <tkoenig@netcologne.de> |
|---|---|
| Date | 2022-11-12 08:30 +0000 |
| Message-ID | <tknljb$36gkg$4@newsreader4.netcologne.de> |
| In reply to | #73926 |
Lynn McGuire <lynnmcguire5@gmail.com> schrieb: > On 11/12/2022 1:36 AM, Thomas Koenig wrote: >> Lynn McGuire <lynnmcguire5@gmail.com> schrieb: >>> xkcd: Y2K and 2038 >>> https://xkcd.com/2697/ >>> >>> It shouldn't cost more than a trillion dollars or two to investigate this. >> >> The switchover to 64-bit systems should have done this. Not sure >> that this cost a trillion dollars, but computers usually have a >> limited lifetime, so they had to be replaced anyway. > > Most software is still 32 bit. Having the operating system as 64 bit > helps but it does not solve the problem of the 32 bit software running > on it. An unsigned 32 bit integer only gets us to 2106. > https://en.wikipedia.org/wiki/Year_2038_problem > > Porting software to 64 bit is a tremendous work for most software. UNIX went through that in the mid-nineties to mid-noughties. It mostly involved cleaning some assumptions about pointer vs. int size. Clean code was OK from the start, but to lessen the pain, most operating systems adopted I4LP8 (integers four bytes, longs and pointers eight bytes). The important thing was that the interfaces remained constant at the API level. I believe what you're discribing is not 32 vs. 64 bit in general, but rather a peculiarity of Windows which Microsoft inflicted on its customers because, well, they could.
[toc] | [prev] | [next] | [standalone]
| From | Muttley@dastardlyhq.com |
|---|---|
| Date | 2022-11-12 10:00 +0000 |
| Message-ID | <tknqsm$14f0$1@gioia.aioe.org> |
| In reply to | #73926 |
On Sat, 12 Nov 2022 01:58:44 -0600 Lynn McGuire <lynnmcguire5@gmail.com> wrote: >On 11/12/2022 1:36 AM, Thomas Koenig wrote: >> Lynn McGuire <lynnmcguire5@gmail.com> schrieb: >>> xkcd: Y2K and 2038 >>> https://xkcd.com/2697/ >>> >>> It shouldn't cost more than a trillion dollars or two to investigate this. >> >> The switchover to 64-bit systems should have done this. Not sure >> that this cost a trillion dollars, but computers usually have a >> limited lifetime, so they had to be replaced anyway. > >Most software is still 32 bit. Having the operating system as 64 bit >helps but it does not solve the problem of the 32 bit software running >on it. An unsigned 32 bit integer only gets us to 2106. I suspect that'll be long enough. The sorts of computers running in 80 years time will probably bear little resemblence to what we have now. > https://en.wikipedia.org/wiki/Year_2038_problem > >Porting software to 64 bit is a tremendous work for most software. Not really as long as the programmer hasn't done something stupid like assuming the size of int or long instead of using int32_t etc.
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2022-11-12 11:29 +0100 |
| Message-ID | <tknsj2$15ad4$2@dont-email.me> |
| In reply to | #73926 |
On 12/11/2022 08:58, Lynn McGuire wrote: > On 11/12/2022 1:36 AM, Thomas Koenig wrote: >> Lynn McGuire <lynnmcguire5@gmail.com> schrieb: >>> xkcd: Y2K and 2038 >>> https://xkcd.com/2697/ >>> >>> It shouldn't cost more than a trillion dollars or two to investigate >>> this. >> >> The switchover to 64-bit systems should have done this. Not sure >> that this cost a trillion dollars, but computers usually have a >> limited lifetime, so they had to be replaced anyway. > > Most software is still 32 bit. Having the operating system as 64 bit > helps but it does not solve the problem of the 32 bit software running > on it. An unsigned 32 bit integer only gets us to 2106. > https://en.wikipedia.org/wiki/Year_2038_problem > > Porting software to 64 bit is a tremendous work for most software. > Most *nix software has been 64-bit clean for decades. Most /new/ Windows software is 64-bit clean. A fair bit of modern software on Windows is cross-platform, sometimes originating in the *nix world, and that will be fine with 64-bit. The only PC software that has trouble with 64-bit is Windows software with a long history, and written with poor code. Code that assumes pointers fit in longs, or that LONG is a suitable type for holding a time value, will have trouble. So yes, that kind of software will be a problem - and some of it will still be in use by 2038. There will be some local problems within company-specific software - but there are /always/ problems with company specific software as requirements change and assumptions are no longer valid. I don't foresee Y2038 being specially problematic. For embedded software, this will not be much of an issue. The great majority of embedded software doesn't have any need of dates or long timings. For small systems that /do/ need dates or long times, it's common to have your own formats to keep track - it's far smaller code to increment a second/minute/hour/day/month/year tracker every second, than to deal with the mess of leap seconds, locales, and other complications of converting UNIX epoch to local time. Also, good embedded developers take overflows into account all the time. They are more likely to see a 32-bit millisecond counter than a second counter, and that overflows after 49 days - it is something you understand and you make sure the code does not fail after 49 days. My only real concern about Y2038 is excessive paranoia and bureaucracy. I expect to be inundated with requirements to document that some flashing light we made in 1990 does not suffer from Y2038 problems.
[toc] | [prev] | [next] | [standalone]
| From | FortranFan <parekhvs@gmail.com> |
|---|---|
| Date | 2022-11-12 06:49 -0800 |
| Message-ID | <572bdd3d-cd20-4980-b234-c2572ae14b8en@googlegroups.com> |
| In reply to | #73926 |
On Saturday, November 12, 2022 at 2:58:50 AM UTC-5, Lynn McGuire wrote: > .. > > Porting software to 64 bit is a tremendous work for most software. Re: "Porting software to 64 bit is a tremendous work for most software", no this is inaccurate. It is "tremendous work" for *only* certain software that have followed platform-dependent nonportable and other coding practices for far too long that have been flagged as problematic on many forums and literature. ISO IEC standard-conforming Fortran codes have long worked portably across different versions of 32-bit and 64-bit versions of Microsoft OS, my first experience with one such code was way back in 2010 on 32-bit and 64-bit Windows 7 which gave me my first introduction to the Fortran 2008 standard. That later had me dig deeper into Fortran 2008 followed by Fortran 2015 that eventually got renamed to Fortran 2018.
[toc] | [prev] | [next] | [standalone]
| From | scott@slp53.sl.home (Scott Lurndal) |
|---|---|
| Date | 2022-11-12 16:05 +0000 |
| Message-ID | <%uPbL.5610$gBW5.3856@fx06.iad> |
| In reply to | #73926 |
Lynn McGuire <lynnmcguire5@gmail.com> writes: >On 11/12/2022 1:36 AM, Thomas Koenig wrote: >> Lynn McGuire <lynnmcguire5@gmail.com> schrieb: >>> xkcd: Y2K and 2038 >>> https://xkcd.com/2697/ >>> >>> It shouldn't cost more than a trillion dollars or two to investigate this. >> >> The switchover to 64-bit systems should have done this. Not sure >> that this cost a trillion dollars, but computers usually have a >> limited lifetime, so they had to be replaced anyway. > >Most software is still 32 bit. In what year? That's certainly not the case today, and it will be even less so by 2038. And how much of that software uses time_t?
[toc] | [prev] | [next] | [standalone]
| From | gah4 <gah4@u.washington.edu> |
|---|---|
| Date | 2022-11-12 10:46 -0800 |
| Message-ID | <ceac6317-89d8-4d20-8f52-79808fcb2c78n@googlegroups.com> |
| In reply to | #73933 |
On Saturday, November 12, 2022 at 8:05:19 AM UTC-8, Scott Lurndal wrote: (snip) > And how much of that software uses time_t? I suspect that a lot of software uses time_t, but more important, is where it uses it. Many compilers, and probably other programs, output a listing file with the date on top. It won't fail, but will print out the wrong date. There is a story, many years old by now, of some DEC system that kept dates with not enough bits. That one had something like make, to decide which files to compile based on the date last changed. That failed at a surprising time, but then got fixed, too. I suspect that by now, most of the important dates are in DBMS systems, and will automatically, and invisibly, have enough bits. And Y2K wasn't really as bad as some thought. I do remember a credit card that didn't work, only once, with expiration date after 2000. That depended on every individual little terminal, and some were updated slowly. Note that the actual failure wasn't in the year 2000, though.
[toc] | [prev] | [next] | [standalone]
| From | Thomas Koenig <tkoenig@netcologne.de> |
|---|---|
| Date | 2022-11-12 19:30 +0000 |
| Message-ID | <tkos87$37b5j$3@newsreader4.netcologne.de> |
| In reply to | #73934 |
gah4 <gah4@u.washington.edu> schrieb: > On Saturday, November 12, 2022 at 8:05:19 AM UTC-8, Scott Lurndal wrote: > (snip) > >> And how much of that software uses time_t? > > I suspect that a lot of software uses time_t, but more important, > is where it uses it. > > Many compilers, and probably other programs, output a listing file > with the date on top. It would be interesting to see which current compilers still do this. VS Fortran probably still does, but it is stuck at FORTRAN 77, and I can hardly call that "current". None of the UNIX-oriented compilers do (the tradition was always to be as quiet as possible), and also not Windows compilers. gfortran does not even have an option to produce a source listing.
[toc] | [prev] | [next] | [standalone]
| From | gah4 <gah4@u.washington.edu> |
|---|---|
| Date | 2022-11-12 11:56 -0800 |
| Message-ID | <a05110de-0aac-44c7-8015-dd29d5bd009bn@googlegroups.com> |
| In reply to | #73938 |
On Saturday, November 12, 2022 at 11:30:18 AM UTC-8, Thomas Koenig wrote: (snip) > > Many compilers, and probably other programs, output a listing file > > with the date on top. > It would be interesting to see which current compilers still do this. > VS Fortran probably still does, but it is stuck at FORTRAN 77, > and I can hardly call that "current". For the IBM compilers, the default is a sysgen option. The ones I knew had it on by default, but you can always turn it off. The option is SOURCE or NOSOURCE. The LIST and NOLIST options give you the listing of the generated assembly code, though not in the form that an assembler will accept. > None of the UNIX-oriented compilers do (the tradition was always to > be as quiet as possible), and also not Windows compilers. gfortran > does not even have an option to produce a source listing. I haven't thought about it so recently. I thought the usual Unix compilers would do it, but not by default. It seems that gcc has options starting with --fdump to generate various files with (hopefully) useful information, and which might have dates in them.
[toc] | [prev] | [next] | [standalone]
| From | Thomas Koenig <tkoenig@netcologne.de> |
|---|---|
| Date | 2022-11-12 23:45 +0000 |
| Message-ID | <tkpb63$37n86$1@newsreader4.netcologne.de> |
| In reply to | #73939 |
gah4 <gah4@u.washington.edu> schrieb: > On Saturday, November 12, 2022 at 11:30:18 AM UTC-8, Thomas Koenig wrote: >> None of the UNIX-oriented compilers do (the tradition was always to >> be as quiet as possible), and also not Windows compilers. gfortran >> does not even have an option to produce a source listing. > > I haven't thought about it so recently. I thought the usual Unix > compilers would do it, but not by default. > > It seems that gcc has options starting with --fdump > to generate various files with (hopefully) useful information, > and which might have dates in them. You can do -fdump-fortran-original to get at the internal syntax tree, and -fdump-tree-original to see what the Fortran front end hands to the middle end. It is quite instructive to see what a simple Fortran statement can result in... No date information, though.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <Keith.S.Thompson+u@gmail.com> |
|---|---|
| Date | 2022-11-12 18:00 -0800 |
| Message-ID | <87mt8vlila.fsf@nosuchdomain.example.com> |
| In reply to | #73926 |
Lynn McGuire <lynnmcguire5@gmail.com> writes:
> On 11/12/2022 1:36 AM, Thomas Koenig wrote:
>> Lynn McGuire <lynnmcguire5@gmail.com> schrieb:
>>> xkcd: Y2K and 2038
>>> https://xkcd.com/2697/
>>>
>>> It shouldn't cost more than a trillion dollars or two to investigate this.
>> The switchover to 64-bit systems should have done this. Not sure
>> that this cost a trillion dollars, but computers usually have a
>> limited lifetime, so they had to be replaced anyway.
>
> Most software is still 32 bit. Having the operating system as 64 bit
> helps but it does not solve the problem of the 32 bit software running
> on it. An unsigned 32 bit integer only gets us to 2106.
> https://en.wikipedia.org/wiki/Year_2038_problem
>
> Porting software to 64 bit is a tremendous work for most software.
An unsigned time_t makes it impossible to represent times before 1970.
Not all software is going to care about that, but in my opinion it's
an unacceptable price.
There are still 32-bit systems and environments. On my 64-bit Ubuntu
system I can compile with `gcc -m32` and get 32-bit pointers and time_t.
But since C and C++ require support for 64-bit integers anyway, it
should be practical to require 64-bit time_t even on 32-bit systems.
(Not sure about Fortran.)
The real problem is going to be 32-bit (or smaller) embedded systems
whose software can't be updated. On the other hand, a lot of such
systems probably don't care what time it is.
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for XCOM Labs
void Void(void) { Void(); } /* The recursive call of the void */
[toc] | [prev] | [next] | [standalone]
| From | gah4 <gah4@u.washington.edu> |
|---|---|
| Date | 2022-11-12 18:08 -0800 |
| Message-ID | <30cc3e8e-49b5-4201-81c6-aa422945ca93n@googlegroups.com> |
| In reply to | #73944 |
On Saturday, November 12, 2022 at 6:00:09 PM UTC-8, Keith Thompson wrote: (snip) > The real problem is going to be 32-bit (or smaller) embedded systems > whose software can't be updated. On the other hand, a lot of such > systems probably don't care what time it is. As I noted, the only Y2K problem that happened to me was from a credit card terminal. As I understand it, the terminal checks the date before sending the request off to the remote system. However, the problems with smaller systems are smaller. If one terminal fails, the rest of the system keeps going. But also, small systems are doing better at being upgradable. I just found out that the computer system inside our car can be upgraded through WiFi. It turns out that our home WiFi reaches out to the street. Just about anything with firmware in flash, and a USB or network connection, now allows for upgrade.
[toc] | [prev] | [next] | [standalone]
| From | red floyd <no.spam.here@its.invalid> |
|---|---|
| Date | 2022-11-13 09:49 -0800 |
| Message-ID | <tkrao1$1ghql$1@redfloyd.dont-email.me> |
| In reply to | #73944 |
On 11/12/2022 6:00 PM, Keith Thompson wrote: > On the other hand, a lot of such > systems probably don't care what time it is. Why am I thinking of Chicago now?
[toc] | [prev] | [next] | [standalone]
| From | gazelle@shell.xmission.com (Kenny McCormack) |
|---|---|
| Date | 2022-11-14 09:14 +0000 |
| Message-ID | <tkt0t0$13ho$2@news.xmission.com> |
| In reply to | #73958 |
In article <tkrao1$1ghql$1@redfloyd.dont-email.me>, red floyd <no.spam.here@its.invalid> wrote: >On 11/12/2022 6:00 PM, Keith Thompson wrote: >> On the other hand, a lot of such >> systems probably don't care what time it is. > >Why am I thinking of Chicago now? > 03:35, 03;34, whatever... -- The randomly chosen signature file that would have appeared here is more than 4 lines long. As such, it violates one or more Usenet RFCs. In order to remain in compliance with said RFCs, the actual sig can be found at the following URL: http://user.xmission.com/~gazelle/Sigs/Voltaire
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2022-11-14 10:09 +0100 |
| Message-ID | <tkt0kg$1nldh$1@dont-email.me> |
| In reply to | #73944 |
On 13/11/2022 03:00, Keith Thompson wrote: > Lynn McGuire <lynnmcguire5@gmail.com> writes: > >> On 11/12/2022 1:36 AM, Thomas Koenig wrote: >>> Lynn McGuire <lynnmcguire5@gmail.com> schrieb: >>>> xkcd: Y2K and 2038 >>>> https://xkcd.com/2697/ >>>> >>>> It shouldn't cost more than a trillion dollars or two to investigate this. >>> The switchover to 64-bit systems should have done this. Not sure >>> that this cost a trillion dollars, but computers usually have a >>> limited lifetime, so they had to be replaced anyway. >> >> Most software is still 32 bit. Having the operating system as 64 bit >> helps but it does not solve the problem of the 32 bit software running >> on it. An unsigned 32 bit integer only gets us to 2106. >> https://en.wikipedia.org/wiki/Year_2038_problem >> >> Porting software to 64 bit is a tremendous work for most software. > > An unsigned time_t makes it impossible to represent times before 1970. > Not all software is going to care about that, but in my opinion it's > an unacceptable price. For the solid majority of programs that use Unix epoch times, unsigned would be fine. There can't be many programs that need dates before 1970 but are happy to think the world started in late 1901 - Unix epoch times are almost always considered as time after 01.01.1970. However, as long as there are /some/ programs that need negative epoch times, you can't break that functionality. > > There are still 32-bit systems and environments. On my 64-bit Ubuntu > system I can compile with `gcc -m32` and get 32-bit pointers and time_t. > I think I heard that the next Ubuntu would not have 32-bit libraries in its normal repositories any more. That won't stop them being available for those that need them. (I think I only need 32-bit libraries on Linux in connection with Wine and 32-bit Windows programs.) More modern Linux (since kernel 5.6, according to Wikipedia) systems have 64-bit time_t even on 32-bit builds. > But since C and C++ require support for 64-bit integers anyway, it > should be practical to require 64-bit time_t even on 32-bit systems. Yes. > (Not sure about Fortran.) (That's better than me - I haven't a clue about Fortran!) > > The real problem is going to be 32-bit (or smaller) embedded systems > whose software can't be updated. On the other hand, a lot of such > systems probably don't care what time it is. > Pretty much any non-trivial embedded system will care a bit about time, but usually only relative time - blink every second, send a message every hour, or whatever. These might have a 32-bit second counter, but are more likely to have millisecond counters or higher resolution. And they generally take overflow into account by simply subtracting start times and current times (generally assuming two's complement wrapping overflow...). Millisecond 32-bit counters overflow after 49 days, so it is something you think about more than 69 year overflows. Small embedded systems which also track the date will generally not do so using Unix epoch timestamps - it's a lot easier to hold a structure with second, minute, hour, day, month, year fields and update it. That avoids all the mess of locales and time and date conversions. Bigger embedded systems are more likely to be updatable - though that does not mean they /will/ be updated. Manufacturers might provide updates for a few years or while the product is still being made and sold, but after that they may not bother. There will be some systems that are a problem - but I do not expect it to be a widespread issue.
[toc] | [prev] | [next] | [standalone]
| From | gah4 <gah4@u.washington.edu> |
|---|---|
| Date | 2022-11-14 01:54 -0800 |
| Message-ID | <2945e197-a0f0-4fbd-a9fa-5b95059e8b97n@googlegroups.com> |
| In reply to | #73973 |
On Monday, November 14, 2022 at 1:09:40 AM UTC-8, David Brown wrote: (snip) > Small embedded systems which also track the date will generally not do > so using Unix epoch timestamps - it's a lot easier to hold a structure > with second, minute, hour, day, month, year fields and update it. That > avoids all the mess of locales and time and date conversions. Reminds me that I have a sprinkler timer that you program with the year. It needs the year because you can set it to water on even or odd days, and so has to get leap years right. But if it watered on the wrong day, it wouldn't be the worst thing. You can program it by week days, then it doesn't even need the month, but you still have to set year and month.
[toc] | [prev] | [next] | [standalone]
| From | Gary Scott <garylscott@sbcglobal.net> |
|---|---|
| Date | 2022-11-14 09:41 -0600 |
| Message-ID | <tktnji$1phlq$1@dont-email.me> |
| In reply to | #73975 |
On 11/14/2022 3:54 AM, gah4 wrote: > On Monday, November 14, 2022 at 1:09:40 AM UTC-8, David Brown wrote: > > (snip) > >> Small embedded systems which also track the date will generally not do >> so using Unix epoch timestamps - it's a lot easier to hold a structure >> with second, minute, hour, day, month, year fields and update it. That >> avoids all the mess of locales and time and date conversions. > > Reminds me that I have a sprinkler timer that you program with the year. > It needs the year because you can set it to water on even or odd days, > and so has to get leap years right. > > But if it watered on the wrong day, it wouldn't be the worst thing. Unless code enforcement catches you watering on the wrong day ... :( > > You can program it by week days, then it doesn't even need the month, > but you still have to set year and month.
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | comp.lang.fortran
csiph-web