[TriLUG] a quickie perl question

Greg Brown gwbrown1 at gmail.com
Fri May 16 18:45:51 EDT 2008


I have a case of teh stupids.  I can convert dates to epoch using
localtime() easily enough (and thus manipulate the dates so I can see how
far in the past a date occurred by subtracting multiples of 86400.. easy
enough).

But how can I convert this past date:

Sun May 11 18:02:35 2008

.... back to epoch?  I want to subtract the past epoch date from the current
to find out how many days have passed.  This should be simple (and I'm sure
it is) but this rusty part of the brain refuses to work and I'm not finding
what I'm needing from Google.

Any help would be greatly appreciated.

Greg



More information about the TriLUG mailing list