7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-02 00:26:45 +00:00

Fix build on Windows

This commit is contained in:
Seth Hillbrand 2025-03-21 14:42:52 -07:00
parent b8225ba2d6
commit faf6243d1a
2 changed files with 6 additions and 1 deletions

View File

@ -208,7 +208,11 @@ std::string GIT_PULL_HANDLER::getFormattedCommitDate( const git_time& aTime )
char dateBuffer[64];
time_t time = static_cast<time_t>( aTime.time );
struct tm timeInfo;
gmtime_r( &time, &timeInfo );
#ifdef _WIN32
localtime_s( &timeInfo, &time );
#else
gmtime_r( &time, &timeInfo );
#endif
strftime( dateBuffer, sizeof( dateBuffer ), "%Y-%b-%d %H:%M:%S", &timeInfo );
return dateBuffer;
}

View File

@ -29,6 +29,7 @@
#include <kiplatform/secrets.h>
#include <trace_helpers.h>
#include <git2.h>
#include <wx/filename.h>
#include <wx/log.h>
#include <wx/textfile.h>