Re: EPOCHREALTIME does not behave correctly before 1970

2021-08-22 Thread Chet Ramey
On 8/22/21 7:52 PM, Kerin Millar wrote: On Sun, 22 Aug 2021 16:13:28 -0400 Chet Ramey wrote: On 8/21/21 1:28 AM, Emanuele Torre wrote: Bash Version: 5.1 Patch Level: 8 Release Status: release get_epochrealtime() casts tv.tv_sec (a time_t a.k.a. int) to unsigned int causing EPOCHREALTIME

Re: EPOCHREALTIME does not behave correctly before 1970

2021-08-22 Thread Kerin Millar
On Sun, 22 Aug 2021 16:13:28 -0400 Chet Ramey wrote: > On 8/21/21 1:28 AM, Emanuele Torre wrote: > > > Bash Version: 5.1 > > Patch Level: 8 > > Release Status: release > > > > > get_epochrealtime() casts tv.tv_sec (a time_t a.k.a. int) to unsigned > > int causing EPOCHREALTIME to not behave co

Re: EPOCHREALTIME does not behave correctly before 1970

2021-08-22 Thread Alex fxmbsw7 Ratchev
lol undefined behavior, tho its important to test such important functionality, as setting time back bad book by the live of 'use your computer only so' im just saying nowadays as earlier software is more ugly bugs than useful On Sun, Aug 22, 2021, 23:28 Greg Wooledge wrote: > On Sun, Aug 22,

Re: EPOCHREALTIME does not behave correctly before 1970

2021-08-22 Thread Greg Wooledge
On Sun, Aug 22, 2021 at 10:30:26PM +0200, Alex fxmbsw7 Ratchev wrote: > why disregard or invalid, mark 0 is that date, less is minus, .. all working It's not that simple. Calendars get really *interesting* if you go farther back in history. The switch from the Julian to the Gregorian calendar di

Re: EPOCHREALTIME does not behave correctly before 1970

2021-08-22 Thread Alex fxmbsw7 Ratchev
why disregard or invalid, mark 0 is that date, less is minus, .. all working On Sun, Aug 22, 2021, 22:13 Chet Ramey wrote: > On 8/21/21 1:28 AM, Emanuele Torre wrote: > > > Bash Version: 5.1 > > Patch Level: 8 > > Release Status: release > > > > > get_epochrealtime() casts tv.tv_sec (a time_t a.

Re: EPOCHREALTIME does not behave correctly before 1970

2021-08-22 Thread Chet Ramey
On 8/21/21 1:28 AM, Emanuele Torre wrote: Bash Version: 5.1 Patch Level: 8 Release Status: release get_epochrealtime() casts tv.tv_sec (a time_t a.k.a. int) to unsigned int causing EPOCHREALTIME to not behave correctly before the Unix Epoch. The definition is seconds since the Unix epoch.

Re: EPOCHREALTIME does not behave correctly before 1970

2021-08-21 Thread Robert Elz
Date:Sat, 21 Aug 2021 07:28:23 +0200 From:Emanuele Torre Message-ID: | I have also read that gettimeofday() is considered obsolete and is | deprecated by POSIX. It is being removed as a required interface, but it still exists everywhere (and will for a very lon