about summary refs log tree commit diff
path: root/src/main.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main.zig b/src/main.zig
index 6cf86a5..392a75c 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -150,8 +150,15 @@ fn build(allocator: std.mem.Allocator, f: std.fs.File, page_name: []const u8, sr
         defer allocator.free(srcpathZ);
         _ = std.os.linux.stat(srcpathZ, attr);
         const mtime = attr.mtime();
-        const mtime_str = c.ctime(&mtime.tv_sec);
-        break :blk std.mem.span(mtime_str);
+        // const mtime_str = c.ctime(&mtime.tv_sec);
+        var mtime_str: [200]u8 = undefined;
+        const n = c.strftime(
+            &mtime_str,
+            mtime_str.len,
+            "%F",
+            c.localtime(&mtime.tv_sec),
+        );
+        break :blk mtime_str[0..n];
     };
 
     // HEAD