[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: EPOCHREALTIME does not behave correctly before 1970
From: |
Chet Ramey |
Subject: |
Re: EPOCHREALTIME does not behave correctly before 1970 |
Date: |
Sun, 22 Aug 2021 16:13:28 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 |
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. It's not surprising that it
doesn't pay attention to dates before that.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/