tags 1035375 + patch
forwarded 1035375
https://lists.gnu.org/archive/html/info-mtools/2023-05/msg00000.html
thanks
Hi Alper,
> I came across timestamp differences in FAT filesystem images while
> trying to build debian-installer with debrepro (among many other
> things), and tracked it down to mmd/mcopy calls. Here's a short reproducer:
Ah, interesting! And your reproducer is extremely helpful, and
I've managed to put together a proof-of-concept patch:
--- a/directory.c
+++ b/directory.c
@@ -104,7 +104,7 @@ struct directory *mk_entry(const dos_name_t *dn,
unsigned char attr,
uint8_t hour, min_hi, min_low, sec;
uint8_t year, month_hi, month_low, day;
- now = localtime(&date2);
+ now = gmtime(&date2);
dosnameToDirentry(dn, ndir);
ndir->attr = attr;
ndir->ctime_ms = 0;
--
2.40.1
I've gone ahead and forwarded this to the mtools mailing list here:
https://lists.gnu.org/archive/html/info-mtools/2023-05/msg00000.html
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` [email protected] 🍥 chris-lamb.co.uk
`-