1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-18 01:30:27 +02:00

SRFI-19: Add support for ISO 8601 zones with a colon.

* module/srfi/srfi-19.scm (zone-reader): handle a colon in the zone.

* test-suite/tests/srfi-19.test (SRFI date/time library test): Add test.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>

[rlb@defaultvalue.org: adjust commit message; add NEWS]
This commit is contained in:
Denis 'GNUtoo' Carikli 2024-02-29 22:23:43 +01:00 committed by Rob Browning
parent e6587c14dd
commit bc2c612b89
3 changed files with 6 additions and 0 deletions

View file

@ -1268,6 +1268,8 @@
(set! offset (+ offset (* (char->int ch)
60 60))))
(let ((ch (read-char port)))
(if (eqv? ch #\:)
(set! ch (read-char port)))
(if (eof-object? ch)
(time-error 'string->date 'bad-date-template-string
(list "Invalid time zone number" ch)))