unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* Patch for scm_strftime() in stime.c
@ 2004-05-02 14:45 Andreas Vögele
  2004-05-02 19:46 ` Andreas Vögele
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Vögele @ 2004-05-02 14:45 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 315 bytes --]

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. The patch changes scm_strftime() so that mktime() is called to 
fix tm_isdst. I don't know if this problem is HP-specific but I decided 
to use #ifdef __hpux.


[-- Attachment #2: stime.c.diff --]
[-- Type: application/octet-stream, Size: 583 bytes --]

Index: stime.c
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/stime.c,v
retrieving revision 1.88
diff -u -r1.88 stime.c
--- stime.c	27 Apr 2004 22:43:28 -0000	1.88
+++ stime.c	2 May 2004 14:36:59 -0000
@@ -633,6 +633,12 @@
 	have_zone = 1;
 	SCM_DEFER_INTS;
 	oldenv = setzone (zone, SCM_ARG2, FUNC_NAME);
+
+	/* On HP-UX, the conversion specifier %Z may produce an empty time
+	   zone abbreviation unless mktime() is called to fix tm_isdst. */
+# if defined(__hpux)
+	mktime (&t);
+# endif
       }
 #endif
 

[-- 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] 3+ messages in thread

end of thread, other threads:[~2004-05-02 23:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-02 14:45 Patch for scm_strftime() in stime.c Andreas Vögele
2004-05-02 19:46 ` Andreas Vögele
2004-05-02 23:02   ` Kevin Ryde

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).