Re: EPOCHREALTIME to days, hours, minutes, seconds
From:
Alex fxmbsw7 Ratchev
Subject:
Re: EPOCHREALTIME to days, hours, minutes, seconds
Date:
Thu, 19 Aug 2021 21:57:00 +0200
fyi, converting secs to human date is not so direct part of benchmark style
seconds over seconds difference
On Thu, Aug 19, 2021, 21:55 Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com> wrote:
> ~ $ d=$EPOCHREALTIME dd=${d%.*} t=( $( printf '%(%FT%T)T %(%z)T' $dd $dd )
> ) t[1]=${t[1]::3}:${t[1]:3} r=$( date -d "${t[*]}" +%FT%T.${d#*.}%z ) ;
> declare -p r
> declare -- r="2021-08-19T21:55:07.872144+0200"
>
> On Thu, Aug 19, 2021, 20:38 hancooper via <help-bash@gnu.org> wrote:
>
>> Is there a neat way to convert from decimal seconds (result from
>> EPOCHREALTIME) to days, hours, minutes, seconds?
>
>