Yes, this is indeed a perfectly valid request I already thought about by myself. (And, BTW, great resource you've linked!)
I'm just working at a similar, but slightly different approach to solve this issue, as the two suggestions/patches do not work as best as they could, I think: The first one does not work with the "date" command on BSD style systems (like Mac OS X) (because it needs the "-r" option instead of the "-d/--date" option), and the second one (besides also not working with BSD "date") has the problem that the "ChangeLog" file is not really updated anymore since I switched over to Git, so its file date is no good indicator for the source date anymore (and Git may break it anyway when changing branches, updating it to the current time).
So I've implemented the following approach now:
- use SOURCE_DATE_EPOCH, if it is defined,
- else use the last Git commit date, if there is a ".git" directory and no modified files exist,
- else use the current date (so this is more or less for development only).
I've also changed the text on the "version" screen from "compile time" to "source date" accordingly.
The change will be pushed to the Git repo in the next few days.
For us the ChangeLog approach would also have worked, because the timestamp is fixed in the release tarball.
Yes, for the purpose of reproducible builds this would work just fine, too, but as an indicator of the source date it wouldn't work that well then. So the fix should solve both problems now.
Just pushed it to the Git repo, and should be in the next release version 4.0.0.1 soon.