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:07 +0000 (14:04 -0400)
commit63fcae2a0961ee9e0a4b516b678daccf9f7c9fc3
treed7841fae88f6a46eb56e62499ee5c780e71b3488
parent465488439e75bbb9bc9fbbba0e23c0036cf9937d
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