gmtime requires an explicit cast on some platforms

This commit is contained in:
Jon Evans 2023-10-20 11:25:22 -04:00
parent 32ee3bdabd
commit e251bbd217
1 changed files with 2 additions and 1 deletions

View File

@ -159,7 +159,8 @@ std::string GIT_PULL_HANDLER::getFirstLineFromCommitMessage( const std::string&
std::string GIT_PULL_HANDLER::getFormattedCommitDate( const git_time& aTime )
{
char dateBuffer[64];
strftime( dateBuffer, sizeof( dateBuffer ), "%Y-%b-%d %H:%M:%S", gmtime( &aTime.time ) );
time_t time = static_cast<time_t>( aTime.time );
strftime( dateBuffer, sizeof( dateBuffer ), "%Y-%b-%d %H:%M:%S", gmtime( &time ) );
return dateBuffer;
}