From df861ac3576d3f46419537f2a1893170f4b52fb0 Mon Sep 17 00:00:00 2001 From: Sebastian Thomschke Date: Sun, 19 Oct 2025 14:45:52 +0200 Subject: [PATCH] [lua] file FileSytem.stat time conversion for ctime/atime/mtime Currently FileSystem.stat() on Lua returns wrong values for ctime/atime/mtime because of missing conversion from seconds to milliseconds --- std/lua/_std/sys/FileSystem.hx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/std/lua/_std/sys/FileSystem.hx b/std/lua/_std/sys/FileSystem.hx index 270b98cec2f..4f0313b27bb 100644 --- a/std/lua/_std/sys/FileSystem.hx +++ b/std/lua/_std/sys/FileSystem.hx @@ -54,12 +54,12 @@ class FileSystem { rdev: l.rdev, size: l.size, nlink: l.nlink, - mtime: Date.fromTime(l.mtime.sec + l.mtime.nsec / 1000000), + mtime: Date.fromTime(l.mtime.sec * 1000 + l.mtime.nsec / 1000000), mode: l.mode, ino: l.ino, dev: l.dev, - ctime: Date.fromTime(l.ctime.sec + l.ctime.nsec / 1000000), - atime: Date.fromTime(l.atime.sec + l.atime.nsec / 1000000) + ctime: Date.fromTime(l.ctime.sec * 1000 + l.ctime.nsec / 1000000), + atime: Date.fromTime(l.atime.sec * 1000 + l.atime.nsec / 1000000) }; }