chiark / gitweb /
More portable handling of SOURCE_DATE_EPOCH
authorBen Harris <bjh21@bjh21.me.uk>
Tue, 4 Feb 2025 23:11:17 +0000 (23:11 +0000)
committerBen Harris <bjh21@bjh21.me.uk>
Tue, 4 Feb 2025 23:11:17 +0000 (23:11 +0000)
commit759f263d600437093452ede20899a82cebd0cef8
treee334f69587a835be0f3c73a575b61dccc3e19378
parent239363800f6beaf74d8cafe275d11cb8a8501abb
More portable handling of SOURCE_DATE_EPOCH

Now we don't make any assumption about being on a POSIX system, and
instead have our own implementation of gmtime().  This turns out to be
shorter than the comment explaining why the previous code was more or
less valid.

While I'm in the area, also fail if the year is after 9999, since
asctime() causes undefined behaviour in those cases.
bedstead.c