Skip to contentSkip to conversation

libjpeg-turbo: fix timezone of reproducible build timestamp

PATCH New Christopher Clark 1 participant 1 message Aug 10, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libjpeg-turbo: fix timezone of reproducible build timestamp

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

---
 meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb +1 -1
index 15353b5..6be6aa5 100644
@@ -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)}"
Signature · 1 line
2.7.4