GNU bug report logs - #12246
[patch] iso 8601 specifies zero padding, not space padding

Previous Next

Package: guile;

Reported by: Ian Price <ianprice90 <at> googlemail.com>

Date: Tue, 21 Aug 2012 11:23:01 UTC

Severity: normal

Tags: patch

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ian Price <ianprice90 <at> googlemail.com>
To: 12246 <at> debbugs.gnu.org
Subject: bug#12246: [patch] iso 8601 specifies zero padding, not space padding
Date: Tue, 21 Aug 2012 12:21:58 +0100
[Message part 1 (text/plain, inline)]
In srfi 19, there is convenience format directives for various ISO 8601
date/time formats. i.e.

     ~2     ISO-8601 time+zone, `~k:~M:~S~z'
     ~3     ISO-8601 time, `~k:~M:~S'
     ~4     ISO-8601 date/time+zone, `~Y-~m-~dT~k:~M:~S~z'
     ~5     ISO-8601 date/time, `~Y-~m-~dT~k:~M:~S'

However, ~k is incorrect here, as iso 8601 specifies that hours have two
digits (i.e. 9am is "09") which means the ~H directive.

Funnily enough, if you look in srfi-19.scm itself you even see

(define iso-8601-date-time-format "~Y-~m-~dT~H:~M:~S~z")

note, the ~H.

I've attached a patch to fix these.
     
-- 
Ian Price -- shift-reset.com

"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"

[0001-ISO-8601-time-format-specifies-zero-padding-for-hour.patch (text/x-patch, attachment)]

This bug report was last modified 12 years and 352 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.