UNIX Publication

将时间从纪元格式转换为ISO格式

printf '%(%FT%T)T\n' 1606752450

无需perl, awk, 或 /usr/bin/date,bash内置"printf"函数就能搞定。

输出

2020-11-30T11:07:30