[Reproducible-builds] Bug#824266: mkdocs: Please support SOURCE_DATE_EPOCH specification for build time stamps [origin: bam at debian.org]

Reiner Herrmann reiner at reiner-h.de
Fri May 20 20:47:37 UTC 2016


On Wed, May 18, 2016 at 12:16:10PM +0200, Axel Beckert wrote:
> could someone more python-savvy than me have a look at this claim that
> our SOURCE_DATE_EPOCH example for Python on
> https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal#Examples
> is wrong.
> 
> The claim is here:
> https://github.com/mkdocs/mkdocs/issues/938#issuecomment-219574932

I'm not a Python expert, but the example looks right to me:

$ export SOURCE_DATE_EPOCH=1234567890

$ date -u -d @$SOURCE_DATE_EPOCH
Fri Feb 13 23:31:30 UTC 2009

$ python
>>> import os, time, datetime
>>> datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.gmtime())))
datetime.datetime(2009, 2, 13, 23, 31, 30)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20160520/a38a4ea2/attachment.sig>


More information about the Reproducible-builds mailing list