当前位置:IT快活林→LinuxLinux服务

如何使用date命令,把距1970年的秒,转为为正常显示方式

作者:本站整理   发布时间:2008-4-16 19:17:05


比如把1194239226,显示为2007-11-05 13:07:06?-----[Copy to clipboard] [ - ]CODE:[bob@mail ~]$ date -d '1970-01-01 1194239226 sec utc'Mon Nov 5 13:07:06 CST 2007[bob@mail ~]$ -----date +"%F %T" -d"1970-01-01 00:00:00 1194239226 sec"-----to 烈火兄 :你的方法会造成时区错误[Copy to clipboard] [ - ]CODE:[bob@mail ~]$ date +"%F %T" -d"1970-01-01 00:00:00 1194239226 sec"2007-11-05 05:07:06[bob@mail ~]$ -----QUOTE:原帖由 ailms 于 2007-11-5 13:26 发表 screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" alt="" />to 烈火兄 :你的方法会造成时区错误$ date +"%F %T" -d"1970-01-01 00:00:00 1194239226 sec"2007-11-05 05:07:06$ 收到~~ -----学习......
》热 点 关 注