By using localtime() to determine the timestamp that goes into factory
images, the resulting image depends on the timezone of the build system.
Use gmtime() instead, which results in more reproducible images.
Signed-off-by: Sander Vanheule <sander@svanheule.net>
include $(TOPDIR)/rules.mk
PKG_NAME := firmware-utils
-PKG_RELEASE := 1
+PKG_RELEASE := 2
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/kernel.mk
return EXIT_FAILURE;
}
- ptm = localtime(&t);
+ ptm = gmtime(&t);
if (3 != sscanf(version, "v%d.%d.%d", &v0, &v1, &v2)) {
fprintf(stderr, "bad version string \"%s\"\n", version);
else if (time(&t) == (time_t)(-1))
error(1, errno, "time");
- struct tm *tm = localtime(&t);
+ struct tm *tm = gmtime(&t);
s->magic = htonl(0x0000000c);
s->zero = 0;