Fix T44433: print "unknown" rather than "1970-01-01" when .blend date is unknown.
This commit is contained in:
parent
d3c4553552
commit
4e40bdd02c
Notes:
blender-bot
2023-02-14 09:13:18 +01:00
Referenced by issue #44433, Blender think its form the 70's
|
@ -7805,12 +7805,12 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
|||
if (G.debug & G_DEBUG) {
|
||||
char build_commit_datetime[32];
|
||||
time_t temp_time = main->build_commit_timestamp;
|
||||
struct tm *tm = gmtime(&temp_time);
|
||||
struct tm *tm = (temp_time) ? gmtime(&temp_time) : NULL;
|
||||
if (LIKELY(tm)) {
|
||||
strftime(build_commit_datetime, sizeof(build_commit_datetime), "%Y-%m-%d %H:%M", tm);
|
||||
}
|
||||
else {
|
||||
BLI_strncpy(build_commit_datetime, "date-unknown", sizeof(build_commit_datetime));
|
||||
BLI_strncpy(build_commit_datetime, "unknown", sizeof(build_commit_datetime));
|
||||
}
|
||||
|
||||
printf("read file %s\n Version %d sub %d date %s hash %s\n",
|
||||
|
|
Loading…
Reference in New Issue