[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
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:55:37 +0200 |
~ $ 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?
- EPOCHREALTIME to days, hours, minutes, seconds, hancooper, 2021/08/19
- Re: EPOCHREALTIME to days, hours, minutes, seconds,
Alex fxmbsw7 Ratchev <=
- Re: EPOCHREALTIME to days, hours, minutes, seconds, Alex fxmbsw7 Ratchev, 2021/08/19
- Re: EPOCHREALTIME to days, hours, minutes, seconds, Seth David Schoen, 2021/08/19
- Re: EPOCHREALTIME to days, hours, minutes, seconds, Tapani Tarvainen, 2021/08/20
- Re: EPOCHREALTIME to days, hours, minutes, seconds, Andreas Kusalananda Kähäri, 2021/08/20
- EPOCHREALTIME to days, hours, minutes, seconds, hancooper, 2021/08/20
- Re: EPOCHREALTIME to days, hours, minutes, seconds, Alex fxmbsw7 Ratchev, 2021/08/20
- Re: EPOCHREALTIME to days, hours, minutes, seconds, Alex fxmbsw7 Ratchev, 2021/08/20
- EPOCHREALTIME to days, hours, minutes, seconds, hancooper, 2021/08/20
- Re: EPOCHREALTIME to days, hours, minutes, seconds, Alex fxmbsw7 Ratchev, 2021/08/20
- Prev by Date:
EPOCHREALTIME to days, hours, minutes, seconds
- Next by Date:
Re: EPOCHREALTIME to days, hours, minutes, seconds
- Previous by thread:
EPOCHREALTIME to days, hours, minutes, seconds
- Next by thread:
Re: EPOCHREALTIME to days, hours, minutes, seconds
- Index(es):