The branch stable/14 has been updated by markj:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=4b3ee88ea7f886ea4cd15f7838007e9cf7d3fcd5

commit 4b3ee88ea7f886ea4cd15f7838007e9cf7d3fcd5
Author:     Mark Johnston <ma...@freebsd.org>
AuthorDate: 2025-05-08 15:51:26 +0000
Commit:     Mark Johnston <ma...@freebsd.org>
CommitDate: 2025-06-20 12:46:09 +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
    
    (cherry picked from commit 018493d32ac2a637bfb9196bc80ecff89789b808)
---
 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 13a6ade47d6d..e5a4cb133204 100644
--- a/usr.sbin/makefs/msdos/msdosfs_vnops.c
+++ b/usr.sbin/makefs/msdos/msdosfs_vnops.c
@@ -114,7 +114,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) |

Reply via email to