in reply to Re^2: Timegm and timelocal
in thread Timegm and timelocal

You don't need to, but if you do, you don't need to check for negative values afterwards.

You can replace this by:

my $r= $t2-$t1; $r+= 3600 if $r<0;

This code may even be faster because you don't need to divide by 3600.


s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e