diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-05-29 15:58:02 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-05-29 15:58:02 +0000 |
commit | 5a85aca859c5097911197fa0a167574b98a0b80f (patch) | |
tree | 7e92ecae1b82c2e5010f41dabef4688d5c0ba699 /usr.bin/file | |
parent | 81aac03c9f7b7ab48ad14f11ef566a34086d1842 (diff) |
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).
Diffstat (limited to 'usr.bin/file')
-rw-r--r-- | usr.bin/file/magic-test.c | 6 |
1 files 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 <nicm@openbsd.org> @@ -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'; |