首页 > 编程知识 正文

Linux时间戳,unix时间戳转换成时间公式

时间:2023-05-06 21:00:00 阅读:279107 作者:3501

linux中正常显示时间与时间戳的命令:

[root@master history]# date +%F2020-06-19[root@master history]# date +%s1592533825

把时间戳转换为时间的命令

[root@master history]# date -d @15925338252020年 06月 19日 星期五 10:30:25 CST

转换指定日期时间戳:

[root@master history]# date -d '2020-2-22 22:22:22' +%s1582381342

指定日期格式的转换:

[root@master history]# date -d @1582381342 +"%Y-%m-%d %H:%M:%S"2020-02-22 22:22:22

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。