4 ms·
Doesn't 'date' do this on the commabd line?
by gdevenyi 4y ago
Doesn't 'date' do this on the commabd line?
- heyoni 4y agogdate if you’re using home brew on Mac
- donio 4y agodate +'%F %H:%M:%S.%N' -d @1677954553.2134567654 Adjust the format as desired. Or if there is the number of nsecs rather than the fraction: date +'%F %H:%M:%S.%N' -d @$(dc -e '9k 16779545532134567654 10 9^/p') The dc stuff is RPN, k sets the precision, p is print.
- watersb 4y agoI got in the habit of using %T for Time (of day), as a shorthand for %H:%M:%S, but I can't recall how portable that is. date "+%F %T.%N"
- Y_Y 4y agoIf you stopped people from posting about their amazing new project that replicates standard functionality from classic unix tools we'd have very little left.
- heyoni 4y agoCool. Let’s stop people from discussing these ‘amazing’ projects then. That sounds productive.