Denis 'GNUtoo' Carikli <gnu...@cyberdimension.org> writes: > diff --git a/module/srfi/srfi-19.scm b/module/srfi/srfi-19.scm > index 570f933ca..23d115926 100644 > --- a/module/srfi/srfi-19.scm > +++ b/module/srfi/srfi-19.scm > @@ -1271,6 +1271,11 @@ > (if (eof-object? ch) > (time-error 'string->date 'bad-date-template-string > (list "Invalid time zone number" ch))) > + (if (char=? ch #\:) > + (set! ch (read-char port)) > + (if (eof-object? ch) > + (time-error 'string->date 'bad-date-template-string > + (list "Invalid time zone number" ch)))) > (set! offset (+ offset (* (char->int ch) > 10 60))))
This looks reasonable to me -- I wondered about moving the check "up front", eliminating the need for the extra eof?, i.e. (let ((ch (read-char port))) (when (char=? ch #\:) (set! ch (read-char port)) (if (eof-object? ch) (time-error 'string->date 'bad-date-template-string (list "Invalid time zone number" ch))) (set! ...)) (...and (not related), I also wondered about making some of the error messsages more specific, i.e. "Invalid time zone minutes digit" or something.) Thanks -- Rob Browning rlb @defaultvalue.org and @debian.org GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4