Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: "A diagram of C23 basic types" Date: Mon, 28 Apr 2025 19:20:59 -0700 Organization: None to speak of Lines: 55 Message-ID: <87wmb3zp10.fsf@nosuchdomain.example.com> References: <87y0wjaysg.fsf@gmail.com> <87plhd0z76.fsf@nosuchdomain.example.com> <87cydb28gu.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Tue, 29 Apr 2025 04:21:13 +0200 (CEST) Injection-Info: dont-email.me; posting-host="fe38c222d83042bf4ca55271f90f83ec"; logging-data="679407"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX189+3H0OjU0ZajltH8g2dC7" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:1mxKsax9dm+lfsrY6enpTBufGrg= sha1:2gy8I+GbRGBh10YR0WBPw+zMQJk= Bytes: 3891 Janis Papanagnou writes: > [ Just noticed this post while catching up in my backlog, so I'm not > sure my questions/comments have already been addressed elsewhere. ] > > On 16.04.2025 22:04, Scott Lurndal wrote: >>> [...] >> >> Back in the mainframe days, it was common to use julian dates >> as they were both concise (5 BCD digits/20 bits) and sortable. >> >> YYDDD >> >> If time was neeeded, it was seconds since midnight in a reference >> timezone. > > I don't quite understand the rationale behind all that said above. > > "YYDDD" was used without century information? How is that useful? > (I assume it's just the popular laziness that later lead to all the > Y2k chaos activities.) Yes, it was felt that saving storage (perhaps in the form of columns on punch cards) was more important than supporting dates after 1999. One relic of this is the tm_year member of struct tm in , which holds number of years since 1900. It was (I'm fairly sure) originally just a 2-digit year number. > And "seconds since midnight" where taken despite the Julian Dates > have a day start at high noon (12:00)? [*] The Julian day number used by astronomers does start at noon, specifically at noon, Universal Time, Monday, January 1, 4713 BC in the proleptic Julian calendar. As I write this, the current Julian date is 2460794.591939746. Outside of astronomy, the word Julian is (mis)used for just about anything that counts days rather than months and days. A date expressed in the form YYDDD (or YYYYDDD, or YYYYDDD) almost certainly refers to a calendar day, starting and ending at midnight in some time zone. See also the tm_yday member of struct tm, which counts days since January 1 of the specified year. > [*] I recall that e.g. SunOS also had that wrong and assumed start at > midnight. Folks generally don't seem to be aware of that difference. I don't recall SunOS using any kind of Julian days/dates for anything at the system level, though some programs might. It used POSIX time, counting seconds since 1970-01-01 00:00:00 UTC. I'd expect anything other than an astronomical Julian date to assume correctly that each day starts and ends at midnight in some specified time zone. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com void Void(void) { Void(); } /* The recursive call of the void */