plack/Plack — pull request #344 by augensalat (2012-10-17 22:52:39+00:00)
Title: Plack::Middleware::AccessLog: calculation of $tzoffset fails for certain time zones

Fix for time zones, that are not on full hour offsets.

The code in Plack::Middleware::AccessLog was broken for time zones, that don't have full hour offsets.

Example, that illustrates how the implementation failed for +03:30 (Iran):

#> perl -wE 'my $s = 3*60*60 + 30*60; printf "%+03d%02u\n", int($s/3600), $s % 3600;'
+031800

The patch also loads Time::Local only if it is actually needed (in most cases it is not).