Provide the comment time in the timezone of the current user, and the
parent comment poster, to be consistent with the entry page.
Patch by fu.
diffs (31 lines):
diff -r a47859f5df81 -r 2c176a71404b cgi-bin/LJ/S2/ReplyPage.pm
--- a/cgi-bin/LJ/S2/ReplyPage.pm Wed Jul 07 17:58:25 2010 +0800
+++ b/cgi-bin/LJ/S2/ReplyPage.pm Wed Jul 07 18:31:18 2010 +0800
@@ -194,6 +194,18 @@ sub ReplyPage
my $dtalkid = $re_talkid * 256 + $entry->anum;
my $cmtobj = LJ::Comment->new( $u, dtalkid => $dtalkid );
+
+ my $tz_remote;
+ my $datetime_remote;
+ my $datetime_poster;
+ if ( $remote ) {
+ my $tz = $remote->prop( "timezone" );
+ $tz_remote = $tz ? eval { DateTime::TimeZone->new( name => $tz); }
: undef;
+ }
+
+ $datetime_remote = $tz_remote ? DateTime_tz( $cmtobj->unixtime,
$tz_remote ) : undef;
+ $datetime_poster = $parentcomment ? DateTime_tz( $cmtobj->unixtime,
$parentcomment->poster ) : undef;
+
my $replyargs = LJ::viewing_style_args( %$get );
$replyto = {
'_type' => 'Comment',
@@ -209,6 +221,8 @@ sub ReplyPage
'threadroot_url' => $cmtobj->threadroot_url( $replyargs ),
'time' => $datetime,
'system_time' => $datetime,
+ 'time_remote' => $datetime_remote,
+ 'time_poster' => $datetime_poster,
'tags' => [],
'talkid' => $dtalkid,
'link_keyseq' => [ 'delete_comment' ],
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog