bug-bash
[Top][All Lists]
Advanced

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

Re: EPOCHREALTIME


From: Léa Gris
Subject: Re: EPOCHREALTIME
Date: Thu, 19 Aug 2021 15:41:37 +0200
User-agent: Telnet/1.0 [tlh] (PDP11/DEC)

Le 19/08/2021 à 15:10, hancooper écrivait :
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.

A agree 100%

It is as frustrating as printf arguments format being dependent on locale settings:

This will fail because of questionable design decision of having a mutable argument format:

LC_NUMERIC=fr_FR@UTF-8; printf 'Pi: %2.4f\n` "$(bc -l <<<'4*a(1)')"

Note how the format indicator still use a dot, but the argument format's decimal separator is that of the system's locale.

Imagine if C++ or Java had methods with different signature depending on system locale. You would scream fool. But for Bash, it was decided it was all fine.

--
Léa Gris




reply via email to

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