diff --git a/fineftp-server/src/filesystem.cpp b/fineftp-server/src/filesystem.cpp index 5bb6084..c95aa25 100644 --- a/fineftp-server/src/filesystem.cpp +++ b/fineftp-server/src/filesystem.cpp @@ -193,17 +193,17 @@ namespace Filesystem #if defined(__unix__) localtime_r(&now_time_t, &now_timeinfo); - localtime_r(&file_status_.st_mtime, &file_timeinfo); + gmtime_r (&file_status_.st_mtime, &file_timeinfo); #elif defined(_MSC_VER) localtime_s(&now_timeinfo, &now_time_t); - localtime_s(&file_timeinfo, &file_status_.st_mtime); + gmtime_s (&file_timeinfo, &file_status_.st_mtime); #else static std::mutex mtx; { std::lock_guard lock(mtx); now_timeinfo = *std::localtime(&now_time_t); - file_timeinfo = *std::localtime(&file_status_.st_mtime); + file_timeinfo = *std::gmtime (&file_status_.st_mtime); } #endif