From 5800cb87bc6bb74879c914102bd81e11eb4e7dd4 Mon Sep 17 00:00:00 2001 From: Paul Bovis Date: Mon, 16 Nov 2015 08:42:17 -0700 Subject: [PATCH] change instances of gmdate to date I changed all instances of gmdate (lines 180, 190 and 320) to date. This way, the date reported in the comments will respect the server's local time as set by date.timezone in php.ini (for apache2, at least). --- comments.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/comments.php b/comments.php index 88709f8..1dda2ac 100644 --- a/comments.php +++ b/comments.php @@ -177,7 +177,7 @@ class CommentsPlugin extends Plugin $data['comments'][] = [ 'text' => $text, - 'date' => gmdate('D, d M Y H:i:s', time()), + 'date' => date('D, d M Y H:i:s', time()), 'author' => $name, 'email' => $email ]; @@ -187,7 +187,7 @@ class CommentsPlugin extends Plugin 'lang' => $lang, 'comments' => array([ 'text' => $text, - 'date' => gmdate('D, d M Y H:i:s', time()), + 'date' => date('D, d M Y H:i:s', time()), 'author' => $name, 'email' => $email ]) @@ -317,7 +317,7 @@ class CommentsPlugin extends Plugin $pages[] = [ 'title' => $file->data['title'], 'commentsCount' => count($file->data['comments']), - 'lastCommentDate' => gmdate('D, d M Y H:i:s', $file->modifiedDate) + 'lastCommentDate' => date('D, d M Y H:i:s', $file->modifiedDate) ]; }