* Small patch for srfi-19.test on HP-UX
@ 2004-04-25 15:11 Andreas Vögele
2004-04-26 1:38 ` Kevin Ryde
0 siblings, 1 reply; 8+ messages in thread
From: Andreas Vögele @ 2004-04-25 15:11 UTC (permalink / raw)
The time zone CET does not exist on HP-UX. The following patch
modifies srfi-19.test so that the time zone MEZ-1MESZ is used on
HP-UX.
Index: srfi-19.test
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/test-suite/tests/srfi-19.test,v
retrieving revision 1.3
diff -u -r1.3 srfi-19.test
--- srfi-19.test 22 Aug 2003 22:30:52 -0000 1.3
+++ srfi-19.test 25 Apr 2004 14:36:30 -0000
@@ -26,6 +26,11 @@
:use-module (srfi srfi-19)
:use-module (ice-9 format))
+;; The time zone CET does not exist on HP-UX.
+(define CET (if (string=? (utsname:sysname (uname)) "HP-UX")
+ "MEZ-1MESZ"
+ "CET"))
+
(define (with-tz* tz thunk)
"Temporarily set the TZ environment variable to the passed string
value and call THUNK."
@@ -68,7 +73,7 @@
;; on 2001-06-01, there should be two hours zone offset
;; between CET (CEST) and GMT
(= (date-zone-offset
- (with-tz "CET"
+ (with-tz CET
(time->date time)))
7200))))
@@ -131,7 +136,7 @@
(test-dst modified-julian-day->date date->modified-julian-day)
(pass-if "string->date respects local DST if no time zone is read"
(time=? (date->time-utc
- (with-tz "CET"
+ (with-tz CET
(string->date "2001-06-01@14:00" "~Y-~m-~d@~H:~M")))
(date->time-utc
(make-date 0 0 0 12 1 6 2001 0))))
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Small patch for srfi-19.test on HP-UX
2004-04-25 15:11 Small patch for srfi-19.test on HP-UX Andreas Vögele
@ 2004-04-26 1:38 ` Kevin Ryde
2004-04-26 4:26 ` Paul Jarc
0 siblings, 1 reply; 8+ messages in thread
From: Kevin Ryde @ 2004-04-26 1:38 UTC (permalink / raw)
Cc: bug-guile
Andreas Vögele <voegelas@gmx.net> writes:
>
> +;; The time zone CET does not exist on HP-UX.
> +(define CET (if (string=? (utsname:sysname (uname)) "HP-UX")
> + "MEZ-1MESZ"
> + "CET"))
It'd be better not to hard code a system name. Is there some way to
test which of the two works?
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Small patch for srfi-19.test on HP-UX
2004-04-26 1:38 ` Kevin Ryde
@ 2004-04-26 4:26 ` Paul Jarc
2004-04-26 6:04 ` Andreas Vögele
0 siblings, 1 reply; 8+ messages in thread
From: Paul Jarc @ 2004-04-26 4:26 UTC (permalink / raw)
Cc: bug-guile, Andreas Vögele
Kevin Ryde <user42@zip.com.au> wrote:
> It'd be better not to hard code a system name. Is there some way to
> test which of the two works?
Or is there a TZ designation that works everywhere - say, expressed as
an offset from UTC?
paul
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Small patch for srfi-19.test on HP-UX
2004-04-26 4:26 ` Paul Jarc
@ 2004-04-26 6:04 ` Andreas Vögele
2004-04-26 15:06 ` Paul Jarc
2004-05-09 0:48 ` Kevin Ryde
0 siblings, 2 replies; 8+ messages in thread
From: Andreas Vögele @ 2004-04-26 6:04 UTC (permalink / raw)
Cc: bug-guile, Kevin Ryde
[-- Attachment #1: Type: text/plain, Size: 756 bytes --]
Paul Jarc writes:
> Kevin Ryde <user42@zip.com.au> wrote:
>> It'd be better not to hard code a system name. Is there some way to
>> test which of the two works?
>
> Or is there a TZ designation that works everywhere - say, expressed as
> an offset from UTC?
CET is used in srfi19.test to check if the offset is correct during
summer time. That check won't work if the offset is specified in the
environment variable TZ.
There's no common synonym for CET but the time zone EST5EDT seems to
work on GNU/Linux, Solaris, HP-UX and Mac OS X. I'll ask a friend to
check EST5EDT on AIX (by running the command "TZ=EST5EDT date"). The
offset to UTC is -4 hours during summer time.
A patch for srfi-19.test that uses EST5EDT instead of CET is attached.
[-- Attachment #2: srfi-19.test.diff --]
[-- Type: application/octet-stream, Size: 1839 bytes --]
*** guile-core/test-suite/tests/srfi-19.test.orig Mon Apr 26 07:51:23 2004
--- guile-core/test-suite/tests/srfi-19.test Mon Apr 26 07:51:46 2004
***************
*** 65,76 ****
(pass-if (format "~A respects local DST if no TZ-OFFSET given"
time->date)
(let ((time (date->time (make-date 0 0 0 12 1 6 2001 0))))
! ;; on 2001-06-01, there should be two hours zone offset
! ;; between CET (CEST) and GMT
(= (date-zone-offset
! (with-tz "CET"
(time->date time)))
! 7200))))
(define-macro (test-time-conversion a b)
(let* ((a->b-sym (symbol-append a '-> b))
--- 65,76 ----
(pass-if (format "~A respects local DST if no TZ-OFFSET given"
time->date)
(let ((time (date->time (make-date 0 0 0 12 1 6 2001 0))))
! ;; on 2001-06-01, there should be four hours zone offset
! ;; between EST (EDT) and GMT
(= (date-zone-offset
! (with-tz "EST5EDT"
(time->date time)))
! -14400))))
(define-macro (test-time-conversion a b)
(let* ((a->b-sym (symbol-append a '-> b))
***************
*** 131,138 ****
(test-dst modified-julian-day->date date->modified-julian-day)
(pass-if "string->date respects local DST if no time zone is read"
(time=? (date->time-utc
! (with-tz "CET"
! (string->date "2001-06-01@14:00" "~Y-~m-~d@~H:~M")))
(date->time-utc
(make-date 0 0 0 12 1 6 2001 0))))
;; check time comparison procedures
--- 131,138 ----
(test-dst modified-julian-day->date date->modified-julian-day)
(pass-if "string->date respects local DST if no time zone is read"
(time=? (date->time-utc
! (with-tz "EST5EDT"
! (string->date "2001-06-01@08:00" "~Y-~m-~d@~H:~M")))
(date->time-utc
(make-date 0 0 0 12 1 6 2001 0))))
;; check time comparison procedures
[-- Attachment #3: Type: text/plain, Size: 136 bytes --]
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Small patch for srfi-19.test on HP-UX
2004-04-26 6:04 ` Andreas Vögele
@ 2004-04-26 15:06 ` Paul Jarc
2004-04-26 18:22 ` Andreas Vögele
2004-05-09 0:48 ` Kevin Ryde
1 sibling, 1 reply; 8+ messages in thread
From: Paul Jarc @ 2004-04-26 15:06 UTC (permalink / raw)
Cc: bug-guile, Kevin Ryde
Andreas Vögele <voegelas@gmx.net> wrote:
> There's no common synonym for CET but the time zone EST5EDT seems to work on
> GNU/Linux, Solaris, HP-UX and Mac OS X.
It also works for me on {Free,Net,Open}BSD and BSD/OS. (Then again,
the NetBSD and BSD/OS machines use that time zone by default anyway,
so it's possible (though unlikely) that they failed to understand that
time zone name and fell back to the default.)
paul
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Small patch for srfi-19.test on HP-UX
2004-04-26 15:06 ` Paul Jarc
@ 2004-04-26 18:22 ` Andreas Vögele
0 siblings, 0 replies; 8+ messages in thread
From: Andreas Vögele @ 2004-04-26 18:22 UTC (permalink / raw)
Paul Jarc writes:
> Andreas Vögele <voegelas@gmx.net> wrote:
>> There's no common synonym for CET but the time zone EST5EDT seems to
>> work on
>> GNU/Linux, Solaris, HP-UX and Mac OS X.
>
> It also works for me on {Free,Net,Open}BSD and BSD/OS. (Then again,
> the NetBSD and BSD/OS machines use that time zone by default anyway,
> so it's possible (though unlikely) that they failed to understand that
> time zone name and fell back to the default.)
On NetBSD, zoneinfo/northamerica contains the following entry:
# Old names, for S5 users
# Link LINK-FROM LINK-TO
Link America/New_York EST5EDT
If an unknown time zone name is specified, GNU/Linux, Solaris, HP-UX,
Mac OS X and IRIX default to UTC.
I can confirm that EST5EDT works on IRIX and AIX. The Ultrix manual
page for ctime and the OSF1 manual page for tzset both mention EST5EDT.
Like GNU/Linux, the Hurd uses glibc which supports EST5EDT. Are there
any other UNIX implementations that have to be checked?
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Small patch for srfi-19.test on HP-UX
2004-04-26 6:04 ` Andreas Vögele
2004-04-26 15:06 ` Paul Jarc
@ 2004-05-09 0:48 ` Kevin Ryde
2004-05-09 16:56 ` Andreas Vögele
1 sibling, 1 reply; 8+ messages in thread
From: Kevin Ryde @ 2004-05-09 0:48 UTC (permalink / raw)
Andreas Vögele <voegelas@gmx.net> writes:
>
> A patch for srfi-19.test that uses EST5EDT instead of CET is attached.
Thanks, I made that change.
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Small patch for srfi-19.test on HP-UX
2004-05-09 0:48 ` Kevin Ryde
@ 2004-05-09 16:56 ` Andreas Vögele
0 siblings, 0 replies; 8+ messages in thread
From: Andreas Vögele @ 2004-05-09 16:56 UTC (permalink / raw)
Kevin Ryde writes:
> Andreas Vögele <voegelas@gmx.net> writes:
>>
>> A patch for srfi-19.test that uses EST5EDT instead of CET is attached.
>
> Thanks, I made that change.
Thanks a lot. I can now build Guile on HP-UX. A couple of tests still
fail. I'll look at them as time permits. I'll also look at the Mac OS X
problem.
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-05-09 16:56 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-25 15:11 Small patch for srfi-19.test on HP-UX Andreas Vögele
2004-04-26 1:38 ` Kevin Ryde
2004-04-26 4:26 ` Paul Jarc
2004-04-26 6:04 ` Andreas Vögele
2004-04-26 15:06 ` Paul Jarc
2004-04-26 18:22 ` Andreas Vögele
2004-05-09 0:48 ` Kevin Ryde
2004-05-09 16:56 ` Andreas Vögele
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).