On Thu, Aug 19, 2021 at 4:12 PM hancooper <hancoo...@protonmail.com> wrote:
> On Thursday, August 19, 2021 12:58 PM, Léa Gris <lea.g...@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.