On 2026-01-21, Chris Lamb wrote:
> Whilst working on the Reproducible Builds effort [0], we noticed that
> argparse-manpage generates nondeterministic manpages.
>
> This appears to be a regression from version 4.5 which correctly used
> utcfromtimestamp to parse SOURCE_DATE_EPOCH to a Python datetime
> object. However, 4.7 uses fromtimestamp (cf. "utcfromtimestamp"), so
> the generated manual pages differ depending on the surrounding timezone.
>
> This is affecting at least the src:psutils and src:virtme-ng packages,
> but there are likely more.
...
> diff --git argparse_manpage/compat.py argparse_manpage/compat.py
> index 7567b7e..752f3d3 100644
> --- argparse_manpage/compat.py
> +++ argparse_manpage/compat.py
> @@ -63,6 +63,6 @@ def get_reproducible_date():
> Return current datetime string, but respect SOURCE_DATE_EPOCH
> environment
> variable if specified.
> """
> - return datetime.datetime.fromtimestamp(
> + return datetime.datetime.utcfromtimestamp(
> int(os.environ.get('SOURCE_DATE_EPOCH', time.time())),
> *_TZ_ARGS).strftime('%Y-%m-%d')I can confirm this issue is still present, and the patch fixes the issue. I would like to perform a Non-Maintainer Upload (NMU) applying this patch in the next week or two. Please let me know if there are any outstanding concerns. live well, vagrant
signature.asc
Description: PGP signature

