Debian and SOURCE_DATE_EPOCH=0
John Neffenger
john at status6.com
Sun Feb 15 17:22:45 UTC 2026
On 2/15/26 5:17 AM, David A. Wheeler via rb-general wrote:
> If you want to use a fixed value, "1" is safer.
Or 315532802.
Just to add another restriction ... the Java 'jar' and 'jmod' tools
would require a minimum SOURCE_DATE_EPOCH value of 315532802, which is 2
seconds after January 1, 1980, in UTC:
$ date -d 1980-01-01T00:00:02Z +%s
315532802
Any earlier instant results in the following error after converting
SOURCE_DATE_EPOCH to the '--date=TIMESTAMP' option:
date 1980-01-01T00:00:01+00:00 is not within the valid range
1980-01-01T00:00:02Z to 2099-12-31T23:59:59Z
See my comment in the original pull request for details:
https://github.com/openjdk/jdk/pull/6481#issuecomment-984220137
and this comment for even more details:
https://github.com/openjdk/jdk/pull/6481#issuecomment-983199820
In summary, when creating ZIP files (and therefore JAR and JMOD files),
OpenJDK steers clear of the "magic" (for ZIPs) instant of
1980-01-01T00:00:00Z and doesn't allow an earlier instant.
I'm not sure what we'll do at 2100-01-01T00:00:00Z. :-)
John
More information about the rb-general
mailing list