guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Use Gnulib's `strftime'


From: Neil Jerram
Subject: Re: [PATCH] Use Gnulib's `strftime'
Date: Wed, 17 Sep 2008 22:17:36 +0200

Hi Ludo...

2008/9/2 Ludovic Courtès <address@hidden>:
> Hello!
>
> I'm planning to use Gnulib's `strftime' module on `master' to fix
> portability problems related to `strftime', aka. #24130
> (https://savannah.gnu.org/bugs/?24130).  The good thing is that
> `strftime' will now work the same regardless of the underlying libc.

Excellent!

> The source modification is attached.

I'm just a bit confused about %Z, because it seems to me that the
documentation contradicts the test.

Here's the doc change:

> +Note that @samp{%Z} always ignores the @code{tm:zone} in @var{tm};
> +instead it prints just the current zone (@code{tzset} above).

Here's the test:

> +  (pass-if "strftime %Z doesn't return garbage"
> +    (let ((t (localtime (current-time))))
> +      (set-tm:zone t "ZOW")
> +      (set-tm:isdst t 0)
> +      (string=? (strftime "%Z" t)
> +                "ZOW")))

The doc seems to be saying that (strftime "%Z" tm) will ignore TM's
zone, but the test makes it look like (strftime "%Z" tm) uses TM's
zone.  Am I misunderstanding?

Regards,
      Neil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]