From 065cbba813e3a9cd9e11359c63f08495ef2d5dd7 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Fri, 6 Sep 2024 21:23:55 +0800 Subject: [PATCH] docs: use more robust way to get the modified time --- docs/configuration/yazi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration/yazi.md b/docs/configuration/yazi.md index 4d8f7f02..e9b1d05d 100644 --- a/docs/configuration/yazi.md +++ b/docs/configuration/yazi.md @@ -83,7 +83,7 @@ linemode = "size_and_mtime" -- ~/.config/yazi/init.lua function Linemode:size_and_mtime() local year = os.date("%Y") - local time = (self._file.cha.modified or 0) // 1 + local time = math.floor(self._file.cha.modified or 0) if time > 0 and os.date("%Y", time) == year then time = os.date("%b %d %H:%M", time)