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:01:20 +0000 (14:01 -0400)
commit0c07adf3290c15647d958fd42524929224bd3b39
treec35a2de28ba77d6cb5ee1dabcc1fa6b7231e3a3e
parent1cb6a1ebb36d44985feca77d10c1848b838bd275
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