get_source_date_epoch#
- technote.metadata.builddate.get_source_date_epoch()#
Read the
SOURCE_DATE_EPOCHenvironment variable as a datetime.SOURCE_DATE_EPOCHis the reproducible-builds convention for pinning a build’s timestamp; Sphinx honours it as well. Its value is an integer number of seconds since the Unix epoch.- Returns:
The pinned timestamp, in UTC, or
Noneif the variable is unset, does not hold an integer, or holds a value that is out of range for adatetime.- Return type:
datetime.datetime or None