libjpeg-turbo: fix timezone of reproducible build timestamp

Avoids producing different build results in different timezones.
Uses UTC with SOURCE_DATE_EPOCH.

(From OE-Core rev: b159cb615feb7f27f8d2afc71f547742bb19cde0)

Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Christopher Clark
2018-08-09 18:32:01 -07:00
committed by Richard Purdie
parent c0f9caeda5
commit e02e5c52fd

View File

@@ -46,7 +46,7 @@ DEBUG_OPTIMIZATION_append_armv5 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb
def get_build_time(d):
if d.getVar('SOURCE_DATE_EPOCH') != None:
import datetime
return " --with-build-date="+ datetime.datetime.fromtimestamp(float(d.getVar('SOURCE_DATE_EPOCH'))).strftime("%Y%m%d")
return " --with-build-date="+ datetime.datetime.utcfromtimestamp(float(d.getVar('SOURCE_DATE_EPOCH'))).strftime("%Y%m%d")
return ""
EXTRA_OECONF_append_class-target = "${@get_build_time(d)}"