diff --git a/usr.sbin/makefs/msdos/msdosfs_vnops.c b/usr.sbin/makefs/msdos/msdosfs_vnops.c --- a/usr.sbin/makefs/msdos/msdosfs_vnops.c +++ b/usr.sbin/makefs/msdos/msdosfs_vnops.c @@ -111,7 +111,10 @@ struct tm lt = {0}; t1 = tsp->tv_sec; - localtime_r(&t1, <); + if (stampst.st_ino != 0) + gmtime_r(&t1, <); + else + localtime_r(&t1, <); unsigned long fat_time = ((lt.tm_year - 80) << 25) | ((lt.tm_mon + 1) << 21) |