wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r17788: LJSUP-7460. Post date is incorrect

Committer: gprochaev
LJSUP-7460. Post date is incorrect

U   trunk/cgi-bin/LJ/Widget/Browse.pm
Modified: trunk/cgi-bin/LJ/Widget/Browse.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/Browse.pm	2010-11-26 03:34:50 UTC (rev 17787)
+++ trunk/cgi-bin/LJ/Widget/Browse.pm	2010-11-26 03:39:41 UTC (rev 17788)
@@ -233,13 +233,14 @@
             $post_count++;
             next if $post_count <= $post_skip || $post_count > $post_last;
 
+            my $secondsold = $entry->logtime_unix ? time() - $entry->logtime_unix : undef;
             my $poster = $entry->poster;
             my $userpic = $entry->userpic;
             my @tags = $entry->tags;
             push @tmpl_posts, {
                 subject         => $entry->subject_text,
                 userpic         => $userpic ? $userpic->url : '',
-                posted_ago      => LJ::TimeUtil->ago_text($entry->logtime_unix),
+                posted_ago      => LJ::TimeUtil->ago_text($secondsold),
                 poster          => $poster ? LJ::ljuser($poster) : '?',
                 tags            => scalar @tags ? [ map { { tag => $_ } } @tags ] : '',
                 mood            => $entry->prop('current_mood') || LJ::mood_name($entry->prop('current_moodid')) || '',

Tags: livejournal, pm, wisest-owl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments