bug-bash
[Top][All Lists]
Advanced

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

Re: EPOCHREALTIME


From: Ilkka Virta
Subject: Re: EPOCHREALTIME
Date: Thu, 19 Aug 2021 16:31:04 +0300

On Thu, Aug 19, 2021 at 4:12 PM hancooper <hancooper@protonmail.com> wrote:

> On Thursday, August 19, 2021 12:58 PM, Léa Gris <lea.gris@noiraude.net>
> wrote:
> > (LC_NUMERIC=C; echo "$EPOCHREALTIME")
>
> 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.
>

The locale setting has more to do with which language you speak, rather
than where you are
(that would be the timezone). Even if the number is the same, it's
represented differently in
different languages, e.g. in Finnish, the comma would be the proper
separator, regardless
of if we speak Finnish in Finland, or in the US.

Regardless, one could argue that using the locale separator here is
counterproductive since
other utils, ones that can actually do calculations on the decimal number
(like bc), might not
support it. But for now, you can always use `${EPOCHREALTIME/,/.}` if you
need it with the
dot, no need to change locales.


reply via email to

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