On Thu, Dec 06, 2012 at 11:55:37AM +1300, [email protected] wrote:
| On Thu, Dec 06, 2012 at 09:31:43AM +1100, Rod Whitworth wrote:
| > I think I'm suffering from OldTimers Disease ;-)
| > 
| > I often have cause to use "date -r " to show me what the date stamp is
| > in human terms.
| > It is usually in spamd or on some documents I get that are time stamped
| > using the seconds since the epoc.
| > 
| > Now I have a need to generate some timestamps of my own and, whilst I'm
| > sure I've done it in the past, I cannot remember it now.
| > 
| > Cluebat?
| > 
| 
| date +%s --date="January 01, 1970 00:00 GMT"

This is not gnu date.  If that's what you want, use -j and specify a
date in ccyymmddHHMM.SS format:

[weerd@despair] $ date -j +%s 201212052355.13
1354748113

Note that this is TZ dependant...:

[weerd@despair] $ date -r 1354748113
Wed Dec  5 23:55:13 CET 2012

Paul 'WEiRD' de Weerd

-- 
>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
                 http://www.weirdnet.nl/                 

Reply via email to