change rcs_recentchanges when to absolute, not relative, time

No point in using a relative time value in rcs_recentchanges. Different
consumers of the info want different things.
master
Joey Hess 2008-01-28 22:57:22 -05:00
parent 0f76f8774d
commit 9f25e3436b
6 changed files with 6 additions and 6 deletions

View File

@ -100,7 +100,7 @@ sub cgi_recentchanges ($) { #{{{
my $changelog=[rcs_recentchanges(100)];
foreach my $change (@$changelog) {
$change->{when} = concise(ago($change->{when}));
$change->{when} = concise(ago(time - $change->{when}));
$change->{user} = userlink($change->{user});

View File

@ -372,7 +372,7 @@ sub rcs_recentchanges ($) { #{{{
my ($sha1, $when) = (
$ci->{'sha1'},
time - $ci->{'author_epoch'}
$ci->{'author_epoch'}
);
my (@pages, @messages);

View File

@ -142,7 +142,7 @@ sub rcs_recentchanges ($) { #{{{
rev => $info->{"changeset"},
user => $user,
committype => "mercurial",
when => time - str2time($info->{"date"}),
when => str2time($info->{"date"}),
message => [@message],
pages => [@pages],
};

View File

@ -416,7 +416,7 @@ sub rcs_recentchanges ($) { #{{{
$committype = "monotone";
}
} elsif ($cert->{name} eq "date") {
$when = time - str2time($cert->{value}, 'UTC');
$when = str2time($cert->{value}, 'UTC');
} elsif ($cert->{name} eq "changelog") {
my $messageText = $cert->{value};
# split the changelog into multiple

View File

@ -171,7 +171,7 @@ sub rcs_recentchanges ($) { #{{{
my $rev = $logentry->{revision};
my $user = $logentry->{author};
my $when=time - str2time($logentry->{date}, 'UTC');
my $when=str2time($logentry->{date}, 'UTC');
foreach my $msgline (split(/\n/, $logentry->{msg})) {
push @message, { line => $msgline };

View File

@ -120,7 +120,7 @@ sub rcs_recentchanges ($) {
split(/ /, "$newfiles $modfiles .arch-ids/fake.id");
my $sdate = $head->get("Standard-date");
my $when = time - str2time($sdate, 'UTC');
my $when = str2time($sdate, 'UTC');
my $committype = "web";
if (defined $summ && $summ =~ /$config{web_commit_regexp}/) {