Skip to content
/ git Public
forked from git/git

Commit

Permalink
git-format-patch: Use rfc2822 compliant date.
Browse files Browse the repository at this point in the history
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
hdmdavies authored and Junio C Hamano committed Apr 30, 2006
1 parent aa6bf0e commit 262a6ef
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions git-format-patch.sh
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -205,11 +205,10 @@ sub show_date {
} }
my $t = $time + $minutes * 60; my $t = $time + $minutes * 60;
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = gmtime($t); my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = gmtime($t);
return sprintf("%s %s %d %02d:%02d:%02d %d %+05d", return sprintf("%s, %d %s %d %02d:%02d:%02d %+05d",
$weekday_names[$wday], $weekday_names[$wday], $mday,
$month_names[$mon], $month_names[$mon], $year+1900,
$mday, $hour, $min, $sec, $hour, $min, $sec, $tz);
$year+1900, $tz);
} }
print "From nobody Mon Sep 17 00:00:00 2001\n"; print "From nobody Mon Sep 17 00:00:00 2001\n";
Expand Down

0 comments on commit 262a6ef

Please sign in to comment.