|
|
|
|
|
by 3np
948 days ago
|
|
FWIW these bash shortcuts are handy if you do this a lot: tss() { date -Is -u -d @$1 ; }
tsm() { date -Ins -u -d @$( echo "scale=3; $1 / 1000" | bc) | sed -E -e 's/[0-9]{6}\+/\+/' -e 's/,/./' ; }
tsn() { date -Ins -u -d @$( echo "scale=9; $1 / 1000000000" | bc) | sed 's/,/./' ; }
$ tss 1700000000
2023-11-14T22:13:20+00:00
$ tsm 1700000000000
2023-11-14T22:13:20.000+00:00
$ tsn 1700000000000000000
2023-11-14T22:13:20.000000000+00:00
|
|