linux中正常显示时间与时间戳的命令:
[root@master history]# date +%F
2020-06-19
[root@master history]# date +%s
1592533825
把时间戳转换为时间的命令
[root@master history]# date -d @1592533825
2020年 06月 19日 星期五 10:30:25 CST
转换指定日期时间戳:
[root@master history]# date -d '2020-2-22 22:22:22' +%s
1582381342
指定日期格式的转换:
[root@master history]# date -d @1582381342 +"%Y-%m-%d %H:%M:%S"
2020-02-22 22:22:22