From 020d2dd675dbc0c00dbd510e71825845f7a03e0f Mon Sep 17 00:00:00 2001 From: Kevin Ryde Date: Sun, 2 May 2004 23:25:41 +0000 Subject: [PATCH] =?UTF-8?q?(strftime):=20Force=20tm:isdst=20to=200=20for?= =?UTF-8?q?=20the=20test,=20for=20the=20benefit=20of=20HP-UX.=20=20Reporte?= =?UTF-8?q?d=20by=20Andreas=20V=C3=B6gele.=20Use=20set-tm:zone=20rather=20?= =?UTF-8?q?than=20a=20hard=20coded=20vector=20offset.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test-suite/tests/time.test | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test-suite/tests/time.test b/test-suite/tests/time.test index 59b9125db..7de64de06 100644 --- a/test-suite/tests/time.test +++ b/test-suite/tests/time.test @@ -1,7 +1,7 @@ ;;;; time.test --- test suite for Guile's time functions -*- scheme -*- ;;;; Jim Blandy --- June 1999 ;;;; -;;;; Copyright (C) 1999 Free Software Foundation, Inc. +;;;; Copyright (C) 1999, 2004 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by @@ -21,8 +21,17 @@ (use-modules (test-suite lib) (ice-9 regex)) +;;; +;;; strftime +;;; + +;; Note we must force isdst to get the ZOW zone name out of %Z on HP-UX. +;; If localtime is in daylight savings then it will decide there's no +;; daylight savings zone name for the fake ZOW, and come back empty. +;; (pass-if "strftime %Z doesn't return garbage" (let ((t (localtime (current-time)))) - (vector-set! t 10 "ZOW") + (set-tm:zone t "ZOW") + (set-tm:isdst t 0) (string=? (strftime "%Z" t) "ZOW")))