-
Notifications
You must be signed in to change notification settings - Fork 89
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
[MSHADE-471] deal with DST #220
Conversation
Ultimately it could need some unit test (or it but it is overkill there and hard to do right) + what about documenting how to not need it (local=utc for the build)? |
I'd love, if you find a way to do it |
@hboutemy you merged but I didn't see any test showing that it helps, can you try to work on it - not asking for an IT, no worries. For example a trivial test has the same bug than before the fix so wonder if we should revert the code change and work on a better fix or just let it like that:
will fail with:
So hour is wrong (offset management corrupted the value since it is not from a jar we manage but a jar we consume?) and time is likely wrong too (wrong time is read). Main issue for me is that this fix seems to mix dates (entry time and extra field time - times in practise) so not really sure it is reliable. In terms of fix, what do you intend to do: use the entry time so ignore the x5455 field? use the x5455 create time? use the x5455 modify time? ... About building in UTC I think I would just enable to set default So long story short: there is a date selection/handling to fix, the timezone issue is likely not one and we still have a workaround to not need it (doc point). Side note: this extra field is only valid until 2037 so it can be sane to just ignore it and use the entry time as this since we don't know the original offset and we can't invent it until we have the extra field which is known as UTC relative. |
expectation of this PR is Reproducible Builds one thing you can do is check what you get in a jar vs the project.build.outputTimestamp value that you defined in the pom.xml: you'll see an effect of this |
@hboutemy before testing reproducible builds you should test if you don't break any feature, as of today this code path was breaking timestamps so it must be fixed. As soon as you respect timestamps you are reproducible by design with the stand reproducible limitations - you must use the exact same jdk with the exact same env (which indeed includes the timezone - this is why i think this was a non-issue). |
fyi https://issues.apache.org/jira/browse/MJAR-300 dived recently on DOS date in zip files that are not timezone aware vs Unix timestamp that are timezone aware |
test done with Reproducible Central: https://github.com/hboutemy/reproducible-central/tree/MSHADE-471/MSHADE-471 tests that using UTC does not any more get a different result to using a TZ with a DST proves that the PR fixes the issue |
|
disagree: tests show reproducible builds independent from TZ = what they are supposed to be you are looking for something else: detail what you are looking for and work on it if you want |
like codehaus-plexus/plexus-archiver@b9ea3bf