public: crtlib: modify format of Q_timestamp TIME_FILENAME to make it sortable

This commit is contained in:
Alibek Omarov
2026-01-19 22:33:49 +05:00
parent ed950723cd
commit 1c6eb85a12

View File

@@ -298,7 +298,8 @@ const char* Q_timestamp( int format )
break;
case TIME_FILENAME:
// Build a timestamp that can use for filename (ex: "Nov2006-26 (19.14.28)");
strftime( timestamp, sizeof( timestamp ), "%b%Y-%d_%H.%M.%S", crt_tm );
// a1ba: reordered to make it sortable -> 2006-10-26_19.24.28
strftime( timestamp, sizeof( timestamp ), "%Y-%m-%d_%H.%M.%S", crt_tm );
break;
default:
Q_snprintf( timestamp, sizeof( timestamp ), "%s: unknown format %d", __func__, format );