From 13046e9b16f3e1b2ba6da4b030f302dd3f8e7927 Mon Sep 17 00:00:00 2001
From: Friederike Schwager <schwager@cil.rwth-aachen.de>
Date: Mon, 7 Oct 2019 08:44:19 +0200
Subject: [PATCH] bugfix time format

---
 model/comment.class.php    | 2 +-
 templates/comment.mustache | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/model/comment.class.php b/model/comment.class.php
index 4261a96..6c37987 100644
--- a/model/comment.class.php
+++ b/model/comment.class.php
@@ -394,7 +394,7 @@ class pdfannotator_comment {
             $comment->content = $content;
             $comment->timemodified = time();
             $comment->modifiedby = $USER->id;
-            $time = pdfannotator_get_user_datetime($comment->timemodified);
+            $time = pdfannotator_optional_timeago($comment->timemodified);
             $success = $DB->update_record('pdfannotator_comments', $comment);
         } else {
             $success = false;
diff --git a/templates/comment.mustache b/templates/comment.mustache
index 78dc81c..57f417e 100644
--- a/templates/comment.mustache
+++ b/templates/comment.mustache
@@ -67,7 +67,7 @@
                     <em class="edited">
                         {{# edited }}
                             <div>
-                                <span id="timemodified_{{ uuid }}">{{# str }} editedComment, pdfannotator {{/ str }}{{timemodified}}</span>
+                                <span id="timemodified_{{ uuid }}">{{# str }} editedComment, pdfannotator {{/ str }} {{timemodified}}</span>
                                 <span id="modifiedby_{{ uuid }}">{{modifiedby}}</span>
                             </div>
                         {{/ edited }}
-- 
GitLab