Be more strict about dates we generate
authorMike Rylander <mrylander@gmail.com>
Mon, 8 Oct 2012 18:12:49 +0000 (14:12 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 9 Oct 2012 18:04:25 +0000 (14:04 -0400)
commit235b2e93f2be65c6e490d6390bd6252f35345353
treea4ac17386d293e05eec12fbb53a5f18b1ac0379b
parentfb103be06ed98b1cca9dd1e4bfbe91377e978498
Be more strict about dates we generate

ISO-8601 dates must have a 4-character year component, however strftime does
not left-pad years to 4 characters when the century is one character long even
though the man page for strftime(3) suggests otherwise:

       %F     Equivalent to %Y-%m-%d (the ISO 8601 date format). (C99)

This makes stricter ISO-8601 parsers, such as Perl's DateTime module, unhappy.
So, we'll do it ourselves using the glibc extensions available to strftime for
specifying a padding character and desired length.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/c-apps/oils_sql.c