@matheusbsbs / matheus-bagliano / commits / fab5de7936
Fork 0

format-patch: pretty-print timestamp correctly.

Perl is not C and does not truncate the division result. Arghh! Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Feb 21, 2006 at 18:13 UTC fab5de7936f0cc086836a38d2de4374c3df223b4
1 file changed +1 -1
git-format-patch.sh
+1 -1
@@ -189,7 +189,7 @@ my @month_names = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
189 sub show_date {
190 my ($time, $tz) = @_;
191 my $minutes = abs($tz);
192 - $minutes = ($minutes / 100) * 60 + ($minutes % 100);
192 + $minutes = int($minutes / 100) * 60 + ($minutes % 100);
193 if ($tz < 0) {
194 $minutes = -$minutes;
195 }