MINGW-w64: Fix string(TIMESTAMP) build on 32bits.
Rephrase the string(TIMESTAMP) implementation not to cause gcc-11 ICE on MSYS2/mingw32.
Cherry-picked from master: !6737 (merged) Fixes: #22916 (closed)
Rephrase the string(TIMESTAMP) implementation not to cause gcc-11 ICE on MSYS2/mingw32.
Cherry-picked from master: !6737 (merged) Fixes: #22916 (closed)