From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCgjT-0008Ep-C1 for guix-patches@gnu.org; Wed, 17 Oct 2018 03:59:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCgjO-0004DZ-CG for guix-patches@gnu.org; Wed, 17 Oct 2018 03:59:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:50085) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gCgjO-0004Ci-7p for guix-patches@gnu.org; Wed, 17 Oct 2018 03:59:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gCgjN-00078K-Vk for guix-patches@gnu.org; Wed, 17 Oct 2018 03:59:02 -0400 Subject: [bug#33041] [PATCH] gnu: icedtea-6: Make javadoc reproducible. Resent-Message-ID: Date: Wed, 17 Oct 2018 09:58:11 +0200 From: Danny Milosavljevic Message-ID: <20181017095811.51bdc62e@scratchpost.org> In-Reply-To: <20181014190655.23754-1-boskovits@gmail.com> References: <20181014190655.23754-1-boskovits@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/b5s6NQnrn6ZOW2tmF8zIeNH"; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: =?UTF-8?Q?G=C3=A1bor?= Boskovits Cc: 33041@debbugs.gnu.org --Sig_/b5s6NQnrn6ZOW2tmF8zIeNH Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Gabor, On Sun, 14 Oct 2018 21:06:55 +0200 G=C3=A1bor Boskovits wrote: > +diff -r 06656286f572 -r 6e5f716a6592 src/share/classes/com/sun/tools/doc= lets/formats/html/markup/HtmlDocWriter.java > +--- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDo= cWriter.java Mon Aug 22 10:53:55 2016 -0700 > ++++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDo= cWriter.java Sat Oct 13 20:54:34 2018 +0200 > +@@ -396,6 +396,13 @@ > + */ > + public String today() { > + Calendar calendar =3D new GregorianCalendar(TimeZone.getDefault= ()); > +- return calendar.getTime().toString(); > ++ Date date=3Dcalendar.getTime(); > ++ Map env =3D System.getenv(); > ++ if(env.containsKey("SOURCE_DATE_EPOCH")) { > ++ String epoch=3Denv.get("SOURCE_DATE_EPOCH"); > ++ long unixtime=3DLong.parseLong(epoch); > ++ date=3Dnew Date(unixtime*1000L); > ++ } > ++ return date.toString(); > + } > + } Indentation is off. Also, why not System.getenv("SOURCE_DATE_EPOCH") and check for null? Not t= hat important, though. Otherwise LGTM! --Sig_/b5s6NQnrn6ZOW2tmF8zIeNH Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlvG65MACgkQ5xo1VCww uqXlzQf/WbFKpipNSzy1TNt+Mtn7vJo4fTIqZ5bmpkGjK2IzE28PklIld4KFnHBJ WHW3Rpj22V2FyekhyVZ++KPhLteYjiF9Gh1pXkHr7+w7SJz3UFNwdbAFWCvesw+s /a5jyJ9O0+xvhrwOdCce74a35Hj/dD7jpZPHL7MDfB+MSjPADMsM8yjNLgjuXs92 orFjWYT70nyzDqZBX70AOE3AXEFTOlo6mCmxew7J6+Rzt29b3W3N03WQVhXWBV2k SI8SXzI3Bav4eMPR5Xe9x/djQgRq6VcQSiuU7tLLR6WFKMrPDVFZSOxWIu33XnZX ihHwvn/U1mF+qQkM2he1q4b6jNHrOA== =/B1x -----END PGP SIGNATURE----- --Sig_/b5s6NQnrn6ZOW2tmF8zIeNH--