|There's more than one way to do things|
Re: why are timegm and timelocal returning the same epoch seconds valuesby karlgoethebier (Parson)
|on May 14, 2013 at 20:40 UTC||Need Help??|
Your sub is OK. For me it returns 7200 - GMT+2.
Perhaps calculating the time delta from the timestamps in your file(s), not from the current time? Or do i miss something?
I'm still struggling a bit with this.
As far as i understood your timezone is GMT.
You have a file with some timestamps you think they are in another timezone, right?
And you want to know the difference between this timestamps and GMT, right?
So IMHO your sub needs the timestamps from your file as params...
«why are timegm and timelocal returning the same epoch seconds values»
Because your box is GMT?
Just as a little addendum (assuming you are using bash):
OK, this is the last one, i promise...
Please see also:
«The Crux of the Biscuit is the Apostrophe»