From: Junio C Hamano Date: Wed, 22 Feb 2006 02:13:32 +0000 (-0800) Subject: format-patch: pretty-print timestamp correctly. X-Git-Tag: v1.2.3~13 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=fab5de7936f0cc086836a38d2de4374c3df223b4;p=git.git format-patch: pretty-print timestamp correctly. Perl is not C and does not truncate the division result. Arghh! Signed-off-by: Junio C Hamano --- diff --git a/git-format-patch.sh b/git-format-patch.sh index e54c9e4a..eb75de46 100755 --- a/git-format-patch.sh +++ b/git-format-patch.sh @@ -189,7 +189,7 @@ my @month_names = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); sub show_date { my ($time, $tz) = @_; my $minutes = abs($tz); - $minutes = ($minutes / 100) * 60 + ($minutes % 100); + $minutes = int($minutes / 100) * 60 + ($minutes % 100); if ($tz < 0) { $minutes = -$minutes; }