From: Danny Milosavljevic <dannym@scratchpost.org>
To: "Gábor Boskovits" <boskovits@gmail.com>
Cc: 33041@debbugs.gnu.org
Subject: [bug#33041] [PATCH] gnu: icedtea-6: Make javadoc reproducible.
Date: Wed, 17 Oct 2018 09:58:11 +0200 [thread overview]
Message-ID: <20181017095811.51bdc62e@scratchpost.org> (raw)
In-Reply-To: <20181014190655.23754-1-boskovits@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1139 bytes --]
Hi Gabor,
On Sun, 14 Oct 2018 21:06:55 +0200
Gábor Boskovits <boskovits@gmail.com> wrote:
> +diff -r 06656286f572 -r 6e5f716a6592 src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java
> +--- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java Mon Aug 22 10:53:55 2016 -0700
> ++++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java Sat Oct 13 20:54:34 2018 +0200
> +@@ -396,6 +396,13 @@
> + */
> + public String today() {
> + Calendar calendar = new GregorianCalendar(TimeZone.getDefault());
> +- return calendar.getTime().toString();
> ++ Date date=calendar.getTime();
> ++ Map<String,String> env = System.getenv();
> ++ if(env.containsKey("SOURCE_DATE_EPOCH")) {
> ++ String epoch=env.get("SOURCE_DATE_EPOCH");
> ++ long unixtime=Long.parseLong(epoch);
> ++ date=new Date(unixtime*1000L);
> ++ }
> ++ return date.toString();
> + }
> + }
Indentation is off.
Also, why not System.getenv("SOURCE_DATE_EPOCH") and check for null? Not that important, though.
Otherwise LGTM!
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2018-10-17 7:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-14 19:06 [bug#33041] [PATCH] gnu: icedtea-6: Make javadoc reproducible Gábor Boskovits
2018-10-17 7:58 ` Danny Milosavljevic [this message]
2020-05-14 17:58 ` Ricardo Wurmus
2020-05-14 18:22 ` Gábor Boskovits
2020-12-10 21:31 ` Kei Kebreau
2021-07-14 13:34 ` Maxim Cournoyer
2024-03-07 22:24 ` bug#33041: " Vagrant Cascadian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181017095811.51bdc62e@scratchpost.org \
--to=dannym@scratchpost.org \
--cc=33041@debbugs.gnu.org \
--cc=boskovits@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.