# HG changeset patch # User Oleksandr Gavenko # Date 1291474289 -7200 # Node ID 93b95dfbdac11279240d7c90f9eb740b75322d3b # Parent 58920092b506f0165f37c2521079a9ce5072e2bd About timestamp. Get timestamp. Convert unix timestamp to date. diff -r 58920092b506 -r 93b95dfbdac1 date.rst --- a/date.rst Sat Dec 04 16:21:48 2010 +0200 +++ b/date.rst Sat Dec 04 16:51:29 2010 +0200 @@ -54,3 +54,25 @@ ** Debian Lenny. $ sudo dpkg-reconfigure tzdata + +* About timestamp. + + http://en.wikipedia.org/wiki/Timestamp + http://en.wikipedia.org/wiki/Unix_time + http://en.wikipedia.org/wiki/Leap_second + +** Get timestamp. + +Current timestamp: + + $ date +%s + +Timestamp for specific date/time: + + $ date -d '2010-12-11' +%s + $ date -d '2010-12-11 23:59:59' +%s + +** Convert unix timestamp to date. + + $ date -d '1970-01-01 + 1234567890 seconds' +