Be more strict about dates we generate user/miker/strict-iso-dates
authorMike Rylander <mrylander@gmail.com>
Mon, 8 Oct 2012 18:12:49 +0000 (14:12 -0400)
committerMike Rylander <mrylander@gmail.com>
Mon, 8 Oct 2012 18:21:30 +0000 (14:21 -0400)
commit87b14466d4458ded938310439abd4173e470e82a
tree94c1af9f74d1678bd09b4621dded0d5a2936e3af
parentee8d5613cd3bc469678deece795fb43adb0e8f91
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>
Open-ILS/src/c-apps/oils_sql.c