>From befdf71b04a0d1c02947457baa3c7e5f152b7e8e Mon Sep 17 00:00:00 2001 From: Ian Price Date: Tue, 21 Aug 2012 12:13:25 +0100 Subject: [PATCH] ISO 8601 time format specifies zero padding for hours, not blank padding. * doc/ref/srfi-modules.texi ("SRFI-19 Date to string"): Fix iso 8601 format strings. * module/srfi/srfi-19.scm (directives): Fix iso 8601 format strings. --- doc/ref/srfi-modules.texi | 8 ++++---- module/srfi/srfi-19.scm | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/ref/srfi-modules.texi b/doc/ref/srfi-modules.texi index fdc316f..4fbe250 100644 --- a/doc/ref/srfi-modules.texi +++ b/doc/ref/srfi-modules.texi @@ -2997,10 +2997,10 @@ with locale decimal point, eg.@: @samp{5.2} @item @nicode{~z} @tab time zone, RFC-822 style @item @nicode{~Z} @tab time zone symbol (not currently implemented) @item @nicode{~1} @tab ISO-8601 date, @samp{~Y-~m-~d} address@hidden @nicode{~2} @tab ISO-8601 time+zone, @samp{~k:~M:~S~z} address@hidden @nicode{~3} @tab ISO-8601 time, @samp{~k:~M:~S} address@hidden @nicode{~4} @tab ISO-8601 date/time+zone, @samp{~Y-~m-~dT~k:~M:~S~z} address@hidden @nicode{~5} @tab ISO-8601 date/time, @samp{~Y-~m-~dT~k:~M:~S} address@hidden @nicode{~2} @tab ISO-8601 time+zone, @samp{~H:~M:~S~z} address@hidden @nicode{~3} @tab ISO-8601 time, @samp{~H:~M:~S} address@hidden @nicode{~4} @tab ISO-8601 date/time+zone, @samp{~Y-~m-~dT~H:~M:~S~z} address@hidden @nicode{~5} @tab ISO-8601 date/time, @samp{~Y-~m-~dT~H:~M:~S} @end multitable @end defun diff --git a/module/srfi/srfi-19.scm b/module/srfi/srfi-19.scm index d8f7643..c0a27b1 100644 --- a/module/srfi/srfi-19.scm +++ b/module/srfi/srfi-19.scm @@ -1113,13 +1113,13 @@ (cons #\1 (lambda (date pad-with port) (display (date->string date "~Y-~m-~d") port))) (cons #\2 (lambda (date pad-with port) - (display (date->string date "~k:~M:~S~z") port))) + (display (date->string date "~H:~M:~S~z") port))) (cons #\3 (lambda (date pad-with port) - (display (date->string date "~k:~M:~S") port))) + (display (date->string date "~H:~M:~S") port))) (cons #\4 (lambda (date pad-with port) - (display (date->string date "~Y-~m-~dT~k:~M:~S~z") port))) + (display (date->string date "~Y-~m-~dT~H:~M:~S~z") port))) (cons #\5 (lambda (date pad-with port) - (display (date->string date "~Y-~m-~dT~k:~M:~S") port))))) + (display (date->string date "~Y-~m-~dT~H:~M:~S") port))))) (define (get-formatter char) -- 1.7.7.6