-/* $OpenBSD: output-json.c,v 1.24 2022/04/19 13:52:24 claudio Exp $ */
+/* $OpenBSD: output-json.c,v 1.25 2022/04/20 15:29:24 tb Exp $ */
/*
* Copyright (c) 2019 Claudio Jeker <claudio@openbsd.org>
*
int i;
time(&t);
- setenv("TZ", "UTC", 1);
- tp = localtime(&t);
+ tp = gmtime(&t);
strftime(tbuf, sizeof tbuf, "%FT%TZ", tp);
gethostname(hn, sizeof hn);
-/* $OpenBSD: output.c,v 1.25 2022/04/19 13:52:24 claudio Exp $ */
+/* $OpenBSD: output.c,v 1.26 2022/04/20 15:29:24 tb Exp $ */
/*
* Copyright (c) 2019 Theo de Raadt <deraadt@openbsd.org>
*
int i;
time(&t);
- setenv("TZ", "UTC", 1);
- tp = localtime(&t);
- strftime(tbuf, sizeof tbuf, "%a %b %e %H:%M:%S %Z %Y", tp);
+ tp = gmtime(&t);
+ strftime(tbuf, sizeof tbuf, "%a %b %e %H:%M:%S UTC %Y", tp);
gethostname(hn, sizeof hn);