unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* timezone offsets
@ 2006-06-22 15:57 Aaron VanDevender
  2006-06-22 16:28 ` Aaron VanDevender
  0 siblings, 1 reply; 4+ messages in thread
From: Aaron VanDevender @ 2006-06-22 15:57 UTC (permalink / raw)
  Cc: guile-sources


I notice that if I run:

$ guile -c '(display (strftime "%c %z\n" (localtime (current-time))))'
Thu Jun 22 10:51:21 2006 +0500

But I live at -0500 (CDT), not +500. The following patch fixes it:

Index: stime.c
===================================================================
RCS file: /sources/guile/guile/guile-core/libguile/stime.c,v
retrieving revision 1.108
diff -u -r1.108 stime.c
--- stime.c	17 Apr 2006 00:05:41 -0000	1.108
+++ stime.c	22 Jun 2006 15:53:13 -0000
@@ -498,7 +498,7 @@
   lt->tm_yday = scm_to_int (SCM_SIMPLE_VECTOR_REF (sbd_time, 7));
   lt->tm_isdst = scm_to_int (SCM_SIMPLE_VECTOR_REF (sbd_time, 8));
 #ifdef HAVE_TM_ZONE
-  lt->tm_gmtoff = scm_to_int (SCM_SIMPLE_VECTOR_REF (sbd_time, 9));
+  lt->tm_gmtoff = - scm_to_int (SCM_SIMPLE_VECTOR_REF (sbd_time, 9));
   if (scm_is_false (SCM_SIMPLE_VECTOR_REF (sbd_time, 10)))
     lt->tm_zone = NULL;
   else




_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-01-30  0:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-22 15:57 timezone offsets Aaron VanDevender
2006-06-22 16:28 ` Aaron VanDevender
2007-01-29 18:38   ` clemens fischer
2007-01-30  0:07     ` 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).