Codefix: [CMake] use the UTC0 date for our ISODATE (#12470)

This commit is contained in:
Patric Stout 2024-04-10 10:50:44 +02:00 committed by GitHub
parent f0f97c698b
commit 1b4bb1d38a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -49,7 +49,8 @@ if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
string(SUBSTRING "${FULLHASH}" 0 10 SHORTHASH)
# Get the last commit date
execute_process(COMMAND ${GIT_EXECUTABLE} show -s --pretty=format:%ci HEAD
set(ENV{TZ} "UTC0")
execute_process(COMMAND ${GIT_EXECUTABLE} show -s --date=iso-local --pretty=format:%cd HEAD
OUTPUT_VARIABLE COMMITDATE
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}