summaryrefslogtreecommitdiff
path: root/git-gmi
diff options
context:
space:
mode:
Diffstat (limited to 'git-gmi')
-rw-r--r--git-gmi/git.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/git-gmi/git.py b/git-gmi/git.py
index 2b7fc33..ca8be4b 100644
--- a/git-gmi/git.py
+++ b/git-gmi/git.py
@@ -1,5 +1,6 @@
from pygit2 import *
from hurry.filesize import size, alternative
+from datetime import datetime
import mimetypes
from const import *
from config import *
@@ -72,7 +73,12 @@ class GitGmiRepo:
response = f"{STATUS_SUCCESS} {META_GEMINI}\n" + self.generate_header()
log = self.get_commit_log()
for cmt in log:
- response += f"## {cmt['short_id']} - {cmt['author']}\n{cmt['msg']}\n\n"
+ time = str(datetime.utcfromtimestamp(cmt["time"])) + " UTC"
+ response += (
+ f"## {cmt['short_id']} - {cmt['author']} - {time}\n"
+ f"=> tree/{cmt['short_id']}/ view tree\n"
+ f"{cmt['msg']}\n\n"
+ )
return response
@classmethod