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)

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to