unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: guile-devel@gnu.org
Subject: Re: [PATCH] Use Gnulib's `strftime'
Date: Thu, 18 Sep 2008 23:17:35 +0200	[thread overview]
Message-ID: <87zlm59ms0.fsf@gnu.org> (raw)
In-Reply-To: 49dd78620809171317x6eb44b14p8cdf964d05704ba5@mail.gmail.com

Hi Neil,

"Neil Jerram" <neiljerram@googlemail.com> 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...

Thanks!

Ludo'.





      reply	other threads:[~2008-09-18 21:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-02 20:02 [PATCH] Use Gnulib's `strftime' Ludovic Courtès
2008-09-09 20:32 ` Ludovic Courtès
2008-09-17 20:17 ` Neil Jerram
2008-09-18 21:17   ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zlm59ms0.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).