Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the output reproducible regardless of the system timezone #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lamby
Copy link
Contributor

@lamby lamby commented Feb 6, 2023

Whilst working on the Reproducible Builds effort, I noticed that marked-man generates its output nondeterministically if the value of SOURCE_DATE_EPOCH is within X hours of the end of the UTC month and the build system's timezone offset is greater than or equal to X hours.

You can see an example on the Debian bug.

The solution is to emit the output as UTC and not in the build system's timezone.

Whilst working on the Reproducible Builds effort [0], I noticed that marked-man
generates its output nondeterminstically if the value of SOURCE_DATE_EPOCH is
within X hours of the end of the UTC month and the build system's timezone
offset is greater than or equal to X hours.

You can see an example here:

  https://bugs.debian.org/1030724#5

The solution is to emit the output as UTC and not in the build system's
timezone.

I originally filed this in Debian as bug #1030724 [1].

 [0] https://reproducible-builds.org/
 [1] https://bugs.debian.org/1030724
@kapouer
Copy link
Owner

kapouer commented Feb 6, 2023

Hi Chris, thank you for this.
5be1be8 should fix it.

@kapouer kapouer closed this Feb 6, 2023
@lamby
Copy link
Contributor Author

lamby commented Feb 6, 2023

According to my tests, the change you commited does not change it. As in, I tried that first. :)

@kapouer kapouer reopened this Feb 6, 2023
@kapouer
Copy link
Owner

kapouer commented Feb 6, 2023

Ok, I'll add a test for this.

@kapouer
Copy link
Owner

kapouer commented Feb 6, 2023

Apparently my mistake is in the date option handling code.
A unix timestamp is absolute, UTC timezone should have fixed it.
Could you check with 0562ca6 please ?

@kapouer
Copy link
Owner

kapouer commented Feb 6, 2023

This time it should be ok

@lamby
Copy link
Contributor Author

lamby commented Feb 7, 2023

Yep, this works for me. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants