git: 018493d32ac2 - main - makefs: Use gmtime() instead of localtime for timestamps

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Thu, 08 May 2025 16:03:58 UTC
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=018493d32ac2a637bfb9196bc80ecff89789b808

commit 018493d32ac2a637bfb9196bc80ecff89789b808
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-05-08 15:51:26 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-05-08 15:52:49 +0000

    makefs: Use gmtime() instead of localtime for timestamps
    
    Otherwise the output file's contents will depend on the configured time
    zone.
    
    Reviewed by:    emaste
    MFC after:      1 month
    Sponsored by:   Klara, Inc.
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D50198
---
 usr.sbin/makefs/msdos/msdosfs_vnops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.sbin/makefs/msdos/msdosfs_vnops.c b/usr.sbin/makefs/msdos/msdosfs_vnops.c
index e07f837187fb..441af0cae86a 100644
--- a/usr.sbin/makefs/msdos/msdosfs_vnops.c
+++ b/usr.sbin/makefs/msdos/msdosfs_vnops.c
@@ -113,7 +113,7 @@ unix2fattime(const struct timespec *tsp, uint16_t *ddp, uint16_t *dtp)
 	struct tm lt = {0};
 
 	t1 = tsp->tv_sec;
-	localtime_r(&t1, &lt);
+	gmtime_r(&t1, &lt);
 
 	unsigned long fat_time = ((lt.tm_year - 80) << 25) |
             ((lt.tm_mon + 1) << 21) |