0

Using date +%s i have checked timestamps of my system 1373977364.

Is there any command i could reverse to check with 1373977364 to get initial value .

I also used this command date -d @$1373976832 but its giving 1981 date , but this time stamp is of current time. So can any one guide me.

And i also like to know that I have log file and i like to check first and last interval in it . so i can know the exact time interval. So any one can guide me with this.

Log file has time stamp

1255478541
1245875645
4

1 回答 1

1

命令中的美元符号导致意外结果。

$ date -d @$1373976832 
Sat Nov  7 10:27:12 GMT 1981
$ date -d @1373976832 
Tue Jul 16 12:13:52 GMT 2013

为了找出两个时间戳在天数之间的差异,您可以说:

$ echo "(1255478541-1245875645)/3600" | bc
2667
于 2013-07-16T12:48:07.463 回答