mkfs-util: set timezone to UTC when copying files into fat partition
authorMalte Poll <1780588+malt3@users.noreply.github.com>
Fri, 20 Oct 2023 12:59:41 +0000 (12:59 +0000)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 20 Oct 2023 15:15:52 +0000 (16:15 +0100)
commitb2942c76adc5bb6a3e073aa5cee57834ee3a9813
treefc87e460174b7191d58f06b99044f7469e6fe82f
parent83ee462c72792b955c149522f2b6b114762ad4d7
mkfs-util: set timezone to UTC when copying files into fat partition

mcopy will set the modification time of created directories to the mtime
of the source directories but converts it to the timezone of the host.
This behavior is identical to Windows / DOS:

>  The FAT file system stores time values based on the local time of the computer.

-- https://learn.microsoft.com/en-us/windows/win32/sysinfo/file-times

To achieve reproducible builds, mcopy should be invoked with TZ=UTC.

Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
src/shared/mkfs-util.c