From 704a4e8eaad545d37bac41437202fddc19ad9d4d Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 29 May 2015 15:58:01 +0000 Subject: [PATCH] Use gmtime not localtime when we want UTC, I got it right in one place but not in another two. I expect I was confused by the fact that the original file(1) had them the wrong way round (so, for example, leqldate was actually UTC). --- usr.bin/file/magic-test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/file/magic-test.c b/usr.bin/file/magic-test.c index 35dbf104f08..dbc9fd277ca 100644 --- a/usr.bin/file/magic-test.c +++ b/usr.bin/file/magic-test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: magic-test.c,v 1.5 2015/05/29 15:11:08 nicm Exp $ */ +/* $OpenBSD: magic-test.c,v 1.6 2015/05/29 15:58:01 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott @@ -603,7 +603,7 @@ magic_test_type_date(struct magic_line *ml, struct magic_state *ms) ctime_r(&t, s); break; default: - asctime_r(localtime(&t), s); + asctime_r(gmtime(&t), s); break; } s[strcspn(s, "\n")] = '\0'; @@ -645,7 +645,7 @@ magic_test_type_qdate(struct magic_line *ml, struct magic_state *ms) ctime_r(&t, s); break; default: - asctime_r(localtime(&t), s); + asctime_r(gmtime(&t), s); break; } s[strcspn(s, "\n")] = '\0'; -- 2.20.1