From 8174e8ab775267ce69e7061a42f56db93c3174a3 Mon Sep 17 00:00:00 2001 From: nothingTVatYT Date: Thu, 28 Dec 2023 22:24:34 +0100 Subject: [PATCH 1/3] fix getting file access time for Linux --- Source/Engine/Platform/Linux/LinuxFileSystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Engine/Platform/Linux/LinuxFileSystem.cpp b/Source/Engine/Platform/Linux/LinuxFileSystem.cpp index 97cde4a1c..c56027cd2 100644 --- a/Source/Engine/Platform/Linux/LinuxFileSystem.cpp +++ b/Source/Engine/Platform/Linux/LinuxFileSystem.cpp @@ -657,7 +657,7 @@ DateTime LinuxFileSystem::GetFileLastEditTime(const StringView& path) return DateTime::MinValue(); } - const TimeSpan timeSinceEpoch(0, 0, fileInfo.st_mtime); + const TimeSpan timeSinceEpoch(0, 0, 0, fileInfo.st_mtime); return UnixEpoch + timeSinceEpoch; } From 21c4667f8c8fdc4870df1225719fb85d1264bce6 Mon Sep 17 00:00:00 2001 From: nothingTVatYT Date: Thu, 28 Dec 2023 22:36:33 +0100 Subject: [PATCH 2/3] same problem for Android and Apple --- Source/Engine/Platform/Android/AndroidFileSystem.cpp | 2 +- Source/Engine/Platform/Apple/AppleFileSystem.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Engine/Platform/Android/AndroidFileSystem.cpp b/Source/Engine/Platform/Android/AndroidFileSystem.cpp index a04fc0229..a939124f6 100644 --- a/Source/Engine/Platform/Android/AndroidFileSystem.cpp +++ b/Source/Engine/Platform/Android/AndroidFileSystem.cpp @@ -517,7 +517,7 @@ DateTime AndroidFileSystem::GetFileLastEditTime(const StringView& path) const StringAsANSI<> pathANSI(*path, path.Length()); if (stat(pathANSI.Get(), &fileInfo) == -1) return DateTime::MinValue(); - const TimeSpan timeSinceEpoch(0, 0, fileInfo.st_mtime); + const TimeSpan timeSinceEpoch(0, 0, 0, fileInfo.st_mtime); const DateTime UnixEpoch(1970, 1, 1); return UnixEpoch + timeSinceEpoch; } diff --git a/Source/Engine/Platform/Apple/AppleFileSystem.cpp b/Source/Engine/Platform/Apple/AppleFileSystem.cpp index 9e306019a..3fd52a54b 100644 --- a/Source/Engine/Platform/Apple/AppleFileSystem.cpp +++ b/Source/Engine/Platform/Apple/AppleFileSystem.cpp @@ -498,7 +498,7 @@ DateTime AppleFileSystem::GetFileLastEditTime(const StringView& path) return DateTime::MinValue(); } - const TimeSpan timeSinceEpoch(0, 0, fileInfo.st_mtime); + const TimeSpan timeSinceEpoch(0, 0, 0, fileInfo.st_mtime); return UnixEpoch + timeSinceEpoch; } From e851d18227fcbf26aca8968c2e2a1b69b9c9cb29 Mon Sep 17 00:00:00 2001 From: nothingTVatYT Date: Fri, 29 Dec 2023 01:20:17 +0100 Subject: [PATCH 3/3] same in UnixFile.cpp --- Source/Engine/Platform/Unix/UnixFile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Engine/Platform/Unix/UnixFile.cpp b/Source/Engine/Platform/Unix/UnixFile.cpp index 5fbc75f2e..9cf629d2c 100644 --- a/Source/Engine/Platform/Unix/UnixFile.cpp +++ b/Source/Engine/Platform/Unix/UnixFile.cpp @@ -137,7 +137,7 @@ DateTime UnixFile::GetLastWriteTime() const { return DateTime::MinValue(); } - const TimeSpan timeSinceEpoch(0, 0, fileInfo.st_mtime); + const TimeSpan timeSinceEpoch(0, 0, 0, fileInfo.st_mtime); const DateTime unixEpoch(1970, 1, 1); return unixEpoch + timeSinceEpoch; }