From: Mark H Weaver <mhw@netris.org>
To: Daniel Llorens <daniel.llorens@bluewin.ch>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: [PATCH] Support ~N in SRFI-19 string->date
Date: Tue, 11 Dec 2018 20:53:17 -0500 [thread overview]
Message-ID: <87r2en8q8n.fsf@netris.org> (raw)
In-Reply-To: <99C8A8EB-D4F9-4B5B-BD3B-5C45E4545720@bluewin.ch> (Daniel Llorens's message of "Tue, 11 Dec 2018 19:28:55 +0100")
Hi Daniel,
Daniel Llorens <daniel.llorens@bluewin.ch> writes:
> The previous patch had a broken test. New attempt, tested on stable-2.2.
The revised tests are still broken.
> diff --git a/test-suite/tests/srfi-19.test b/test-suite/tests/srfi-19.test
> index 4d79f1043..256ff74a0 100644
> --- a/test-suite/tests/srfi-19.test
> +++ b/test-suite/tests/srfi-19.test
> @@ -176,6 +176,16 @@ incomplete numerical tower implementation.)"
> (equal? "Sun Jun 05 18:33:00+0200 2005"
> (date->string date))))
>
> + (pass-if "string->date understands nanoseconds (1)"
> + (time=? (date->time-utc (string->date "2018-12-10 10:53:24.189"
> + "~Y-~m-~d ~H:~M:~S.~N"))
> + (date->time-utc (make-date 189000000 24 53 10 10 12 2018 3600))))
> +
> + (pass-if "string->date understands nanoseconds (2)"
> + (time=? (date->time-utc (string->date "2018-12-10 10:53:24.189654321"
> + "~Y-~m-~d ~H:~M:~S.~N"))
> + (date->time-utc (make-date 189654321 24 53 10 10 12 2018 3600))))
> +
> (pass-if "date->string pads small nanoseconds values correctly"
> (let* ((date (make-date 99999999 5 34 12 26 3 2017 0)))
> (equal? "099999999"
The instances of '3600' above, given as the last argument to
'make-date', enable the tests to succeed in your time zone (+0100).
They fail in every other time zone.
Can you look into it and apply an appropriate fix?
Thanks,
Mark
next prev parent reply other threads:[~2018-12-12 1:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-10 18:09 [PATCH] Support ~N in SRFI-19 string->date Daniel Llorens
2018-12-11 18:28 ` Daniel Llorens
2018-12-11 20:52 ` Mark H Weaver
2018-12-12 1:53 ` Mark H Weaver [this message]
2018-12-12 7:36 ` Daniel Llorens
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=87r2en8q8n.fsf@netris.org \
--to=mhw@netris.org \
--cc=daniel.llorens@bluewin.ch \
--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).