Skip to content

Commit 9fb3cfd

Browse files
Add support for ISO 8601 zones with a colon.
From Denis 'GNUtoo' Carikli's patch for Guile.
1 parent f384594 commit 9fb3cfd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

srfi-19.scm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,6 +1339,11 @@
13391339
(if (eof-object? ch)
13401340
(tm:time-error 'string->date 'bad-date-template-string
13411341
(list "Invalid time zone number" ch)))
1342+
(if (char=? ch #\:)
1343+
(set! ch (read-char port))
1344+
(if (eof-object? ch)
1345+
(time-error 'string->date 'bad-date-template-string
1346+
(list "Invalid time zone number" ch))))
13421347
(set! offset (+ offset (* (tm:char->int ch)
13431348
10 60))))
13441349
(let ((ch (read-char port)))

0 commit comments

Comments
 (0)