The above example print the number of seconds since 1970, then the current date/time and finally 1 hour is taken away from the current time and displayed. You could do it adapting this method.
I would want the epoch to be set as 08/13/03 06:17:29. Unfortunately Duncan, I'm doing it in Windows, I'm sorry I failed to mention that. Is there a predefined variable for windows?
Oh, wait, usige you just gave me a thought. If I had it add that date to the epoch and use that as a starting point instead of trying to change the epoch itself, that should work, right?
A quick clarification: $^T holds the time the perl interpreter started in unix time (i.e. seconds past start of Epoch). If you need the current time use the time() function.
carg,
Have a look at either Dat::Manip, or Date::Calc on search.cpan.org. It'll allow you to get the difference between dates and times using functions like str2time, and time2str
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.