SOURCE_DATE_EPOCH and when to clamp timestamps

John Thorvald Wodder II jwodder at
Fri Jun 10 02:28:53 UTC 2022 says:

> Where build processes embed timestamps that are not "current", but are nevertheless still specific to one execution of the build process, they MUST use a timestamp no later than the value of this variable. This is often called "timestamp clamping".

However, I'm not entirely clear on what counts as "specific to one execution of the build process."  Specifically, I am authoring a program that (among other things) takes the latest commit date from a Git repository and formats it alongside the current time.  If SOURCE_DATE_EPOCH is set, it will replace the latter value, but I'm unclear on whether the former value should be "clamped" in this case.  I originally read the quote as saying that "clamping" should happen, but on further reflection, I'm about 90+% sure that it shouldn't, and I thought I'd e-mail here just to be sure.

Any clarification on this point would be appreciated.

-- John Wodder

More information about the rb-general mailing list