Skip to content

Commit

Permalink
Switched to UTC
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianReimold committed Oct 16, 2024
1 parent d2b0a45 commit db6e645
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fineftp-server/src/filesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::mutex> 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

Expand Down

0 comments on commit db6e645

Please sign in to comment.