Skip to content

Commit

Permalink
format-patch: pretty-print timestamp correctly.
Browse files Browse the repository at this point in the history
Perl is not C and does not truncate the division result.  Arghh!

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Feb 22, 2006
1 parent 60ace87 commit fab5de7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-format-patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit fab5de7

Please sign in to comment.