bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EPOCHREALTIME


From: hancooper
Subject: EPOCHREALTIME
Date: Thu, 19 Aug 2021 13:10:44 +0000

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, August 19, 2021 12:58 PM, Léa Gris <lea.gris@noiraude.net> wrote:

> Le 19/08/2021 à 14:43, hancooper via Bug reports for the GNU Bourne
> Again SHell écrivait :
>
> > Have been using $EPOCHREALTIME but can see that the output is as follows.
> > 1629376497,853634
> > The utilisation of tho comma `,` is very inconvenient for those who want to 
> > do time
> > computations. A change towards a period `.` would be the proper way to 
> > display the
> > variable.
> > Furthermore, one gets nanosecond precision when using date. But such 
> > precision
> > is not possible with EPOCHREALTIME. Thusly, the improvement to nanosecond
> > precision is desirable so as to match the capability of data.
> > Felicitations
> > Han
>
> (LC_NUMERIC=C; echo "$EPOCHREALTIME")
>
> It will use a dot

time stamps are a way to track time as a running total of seconds, a count that 
starts
on January 1st, 1970 at UTC. Therefore, the unix time stamp is merely the 
number of
seconds between a particular date and the epoch.  Technically, it should be 
pointed out
that the time does not change no matter where you are located on the globe.

Thusly, EPOCHREALTIME should not be made to depend on the locale.  I have seen 
many
workarounds, that complicate rather than simplify something that should be 
straighforward
and germaine to direct numeric computation.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]