Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libutil explicitly set TZ=UTC so that we don't dep...



details:   https://anonhg.NetBSD.org/src/rev/e20470e17a01
branches:  trunk
changeset: 365903:e20470e17a01
user:      christos <christos%NetBSD.org@localhost>
date:      Mon May 02 19:57:50 2022 +0000

description:
explicitly set TZ=UTC so that we don't depend on the testing rig for it.

diffstat:

 tests/lib/libutil/t_parsedate.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r c064a8cbe369 -r e20470e17a01 tests/lib/libutil/t_parsedate.c
--- a/tests/lib/libutil/t_parsedate.c   Mon May 02 18:28:38 2022 +0000
+++ b/tests/lib/libutil/t_parsedate.c   Mon May 02 19:57:50 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_parsedate.c,v 1.32 2022/04/23 13:08:49 christos Exp $ */
+/* $NetBSD: t_parsedate.c,v 1.33 2022/05/02 19:57:50 christos Exp $ */
 /*-
  * Copyright (c) 2010, 2015 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_parsedate.c,v 1.32 2022/04/23 13:08:49 christos Exp $");
+__RCSID("$NetBSD: t_parsedate.c,v 1.33 2022/05/02 19:57:50 christos Exp $");
 
 #include <atf-c.h>
 #include <errno.h>
@@ -620,7 +620,8 @@
 
 ATF_TP_ADD_TCS(tp)
 {
-       unsetenv("TZ");
+       setenv("TZ", "UTC", 1);
+       tzset();
        ATF_TP_ADD_TC(tp, dates);
        ATF_TP_ADD_TC(tp, times);
        ATF_TP_ADD_TC(tp, dsttimes);



Home | Main Index | Thread Index | Old Index