tde_curdatetime: Add the -u option to call 'date'

so that the result is not time zone dependent.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/66/head
Slávek Banko 4 years ago
parent b2b9e89052
commit 43763c6adf
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -1214,7 +1214,7 @@ macro( tde_curdatetime result )
elseif( TDE_SCM_MODULE_DATETIME )
set( ${result} ${TDE_SCM_MODULE_DATETIME} )
else( )
tde_execute_process( COMMAND "date" "+%m/%d/%Y %H:%M:%S" OUTPUT_VARIABLE ${result} )
tde_execute_process( COMMAND "date" "-u" "+%m/%d/%Y %H:%M:%S" OUTPUT_VARIABLE ${result} )
string( REGEX REPLACE "(..)/(..)/(....) (........).*" "\\1/\\2/\\3 \\4" ${result} ${${result}} )
endif( )
endmacro( tde_curdatetime )

Loading…
Cancel
Save