guile-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Support ~N in SRFI-19 string->date


From: Mark H Weaver
Subject: Re: [PATCH] Support ~N in SRFI-19 string->date
Date: Tue, 11 Dec 2018 20:53:17 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hi Daniel,

Daniel Llorens <address@hidden> 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



reply via email to

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