[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch for scm_strftime() in stime.c
From: |
Andreas Vögele |
Subject: |
Re: Patch for scm_strftime() in stime.c |
Date: |
Sun, 2 May 2004 21:46:13 +0200 |
Andreas Vögele wrote:
Hi,
on HP-UX, test-suite/time.test fails. The problem is that there may be
a mismatch between the time zone name and the daylight savings time
setting.
I thought about this problem. It's probably better to fix the test
instead of scm_strftime(). The test gets the local time and then sets
the time zone to "ZOW". The daylights savings time indicator, which is
currently set in Central Europe, is not unset. Since "ZOW" is not known
to be a time zone where dst is in effect the function strftime()
outputs an empty time zone name on HP-UX. BTW, that explains why the
time test didn't fail a couple of weeks ago. At that time dst wasn't in
effect in Central Europe.
The patch that I sent this afternoon uses mktime() in scm_strftime() to
fix the tm_isdst field. But IMHO it's better to fix the test even if
that means that HP-UX and glibc-based systems behave differently in
some cases. Or do you think that scm_strftime() should silently fix
mismatches between the time zone name and dst?
If yes, then I'd remove #idef __hpux since other systems might behave
similarly to HP-UX. On HP-UX, mktime() doesn't fail if the time zone
and dst mismatch. Instead, tm_isdst is modified. I don't know about
other systems, though.
A patch for time.test is attached.
time.test.diff
Description: Binary data