Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:iddilabs
java-21-openjdk
reproducible-javadoc-timestamp.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File reproducible-javadoc-timestamp.patch of Package java-21-openjdk
diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java index 6bff863e178..60c01d18320 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java @@ -25,7 +25,9 @@ package jdk.javadoc.internal.doclets.formats.html; +import java.time.Instant; import java.time.ZonedDateTime; +import java.time.ZoneId; import java.util.ArrayList; import java.util.EnumSet; import java.util.HashMap; @@ -264,8 +266,12 @@ public class HtmlConfiguration extends BaseConfiguration { return false; } + ZonedDateTime now = ZonedDateTime.now(); + if ( System.getenv("SOURCE_DATE_EPOCH") != null ) { + now = ZonedDateTime.ofInstant(Instant.ofEpochMilli(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))), ZoneId.of("UTC")); + } ZonedDateTime zdt = options.date(); - buildDate = zdt != null ? zdt : ZonedDateTime.now(); + buildDate = zdt != null ? zdt : now; if (!getSpecifiedTypeElements().isEmpty()) { Map<String, PackageElement> map = new HashMap<>();
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor