From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.devel Subject: gmtime tm_zone Date: Thu, 04 Mar 2004 07:12:49 +1000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87k721tz1q.fsf@zip.com.au> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1078555796 21728 80.91.224.253 (6 Mar 2004 06:49:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 6 Mar 2004 06:49:56 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Mar 06 07:49:42 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AzVcz-0000qA-00 for ; Sat, 06 Mar 2004 07:49:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AzVaT-0001T5-Ln for guile-devel@m.gmane.org; Sat, 06 Mar 2004 01:47:05 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1Aydh6-0007Rb-IR for guile-devel@gnu.org; Wed, 03 Mar 2004 16:14:20 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1AydgL-0006hC-9z for guile-devel@gnu.org; Wed, 03 Mar 2004 16:14:06 -0500 Original-Received: from [61.8.0.84] (helo=mailout1.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AydgJ-0006aT-D1 for guile-devel@gnu.org; Wed, 03 Mar 2004 16:13:31 -0500 Original-Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87]) by mailout1.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id i23LDOUe023899 for ; Thu, 4 Mar 2004 08:13:24 +1100 Original-Received: from localhost (ppp71.dyn251.pacific.net.au [203.143.251.71]) by mailproxy2.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id i23LD65b009239 for ; Thu, 4 Mar 2004 08:13:15 +1100 Original-Received: from gg by localhost with local (Exim 3.36 #1 (Debian)) id 1Aydfd-0000PM-00; Thu, 04 Mar 2004 07:12:49 +1000 Original-To: guile-devel@gnu.org Mail-Copies-To: never User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:3481 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3481 --=-=-= * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather than "GMT" always. On glibc tm_zone is "GMT", so this is no change there. But I'm inclined to think that if scm_gmtime is designed to return what gmtime() returns then it should take care to give back whatever zone name the latter has indicated. --=-=-= Content-Disposition: inline; filename=stime.c.gmtime-zone.diff --- stime.c.~1.84.~ 2004-02-18 09:38:38.000000000 +1000 +++ stime.c 2004-03-03 10:11:33.000000000 +1000 @@ -255,7 +255,7 @@ #undef FUNC_NAME static SCM -filltime (struct tm *bd_time, int zoff, char *zname) +filltime (struct tm *bd_time, int zoff, const char *zname) { SCM result = scm_c_make_vector (11, SCM_UNDEFINED); @@ -405,6 +405,7 @@ timet itime; struct tm *bd_time; SCM result; + const char *zname; itime = SCM_NUM2LONG (1, time); SCM_DEFER_INTS; @@ -414,7 +415,12 @@ bd_time = gmtime (&itime); if (bd_time == NULL) SCM_SYSERROR; - result = filltime (bd_time, 0, "GMT"); +#if HAVE_STRUCT_TM_TM_ZONE + zname = bd_time->tm_zone; +#else + zname = "GMT"; +#endif + result = filltime (bd_time, 0, zname); SCM_ALLOW_INTS; return result; } --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel --=-=-=--