aports/testing/xplr/modified-field-lua54.patch
omni ad0ba0173a testing/xplr: fix modified field for lua5.4
The change that tripped the default configuration off was introduced in
Lua 5.3.
2024-01-23 06:04:48 +00:00

14 lines
532 B
Diff

Switch to ISO 8601 while we're at it, but the important change here is to round
down to a value that tostring() can always handle.
--- a/src/init.lua
+++ b/src/init.lua
@@ -3046,7 +3046,7 @@ end
-- Renders the fifth column in the table
xplr.fn.builtin.fmt_general_table_row_cols_4 = function(m)
- return tostring(os.date("%a %b %d %H:%M:%S %Y", m.last_modified / 1000000000))
+ return tostring(os.date("%Y-%m-%d %H:%M:%S", math.floor(m.last_modified / 1000000000)))
end
-- This is where the custom functions can be added.