Skip to content
Commit 63ea8f1a authored by Carlos Garnacho's avatar Carlos Garnacho
Browse files

build: Detect appropriate strftime() year modifier at build time

Different libc implementations (or different platforms) have different
bugs. Even though %Y is documented as a 4-digit number, and %C as
year/100 in a [00-99] range, they both crap out with years under 1000,
using respectively 3 and 1 digits.

This would be typically task for a width modifier (e.g. %4Y, or %2C),
but that was conversely found to break NixOS on Darwin.

Since the existing libc bugs paint us to a corner, detect an
appropriate modifier at build time to get a 4-digit year to get true
ISO 8601 in our supported [0001-9999] year range.

Closes: https://gitlab.gnome.org/GNOME/tracker/-/issues/402
parent 0619c652
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment