[Top][All Lists]

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

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

From: Ludovic Courtès
Subject: Re: [PATCH] Use Gnulib's `strftime'
Date: Thu, 18 Sep 2008 23:17:35 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)

Hi Neil,

"Neil Jerram" <address@hidden> writes:

> 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?

No, you're right.

That was a double mistake of my side: I misunderstood the UTC argument
to `nstrftime ()' as a boolean indicating whether to honor `tm_zone',
and overlooked the part of `scm_strftime ()' intended to "simulate" the
`tm_zone' fields on platforms that lack it...



reply via email to

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