Substitute %T when calling 'strftime()' (%T isn't supported by all compilers)

This commit is contained in:
John Emmas 2021-07-16 12:29:07 +01:00
parent a3fa94d06e
commit efb0d077d1
2 changed files with 4 additions and 4 deletions

View File

@ -643,9 +643,9 @@ touch_cachefile (std::string const& path, std::string const& cache_file, bool ve
char vsttme[128];
struct tm local_time;
localtime_r (&utb.modtime, &local_time);
strftime (v2itme, sizeof(v2itme), "%Y-%m-%d %T", &local_time);
strftime (v2itme, sizeof(v2itme), "%Y-%m-%d %H:%M:%S", &local_time);
localtime_r (&mtime, &local_time);
strftime (vsttme, sizeof(vsttme), "%Y-%m-%d %T", &local_time);
strftime (vsttme, sizeof(vsttme), "%Y-%m-%d %H:%M:%S", &local_time);
PBD::info << "Touch cachefile: set mtime = "
<< utb.modtime << " (" << v2itme << "), plugin mtime = "
<< sb_vst.st_mtime << " (" << vsttme << ")" << endmsg;

View File

@ -426,9 +426,9 @@ touch_cachefile (std::string const& module_path, std::string const& cache_file,
char vsttme[128];
struct tm local_time;
localtime_r (&utb.modtime, &local_time);
strftime (v3itme, sizeof(v3itme), "%Y-%m-%d %T", &local_time);
strftime (v3itme, sizeof(v3itme), "%Y-%m-%d %H:%M:%S", &local_time);
localtime_r (&mtime, &local_time);
strftime (vsttme, sizeof(vsttme), "%Y-%m-%d %T", &local_time);
strftime (vsttme, sizeof(vsttme), "%Y-%m-%d %H:%M:%S", &local_time);
PBD::info << "Touch cachefile: set mtime = "
<< utb.modtime << " (" << v3itme << "), plugin mtime = "
<< sb_vst.st_mtime << " (" << vsttme << ")" << endmsg;