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

timeShift function adds a year up when the added days land on a date between 26 and 31 of December #5598

Closed
asfimport opened this issue Dec 7, 2021 · 3 comments

Comments

@asfimport
Copy link
Collaborator

todord (Bug 65727):
If you try to add days to the current day or specific date by using the timeShift function, and the generated date is between 26 December and 31 December, one year is also added.

For example, if the date is 2021-12-07 (YYYY-MM-dd) and I add 19 days (P19D) the date generated is 2022-12-26 instead of Bug 2021-12-26.

Created attachment jmeter2.png: Specific values where the bug is present

Specific values where the bug is present

Severity: normal
OS: All

@asfimport
Copy link
Collaborator Author

@FSchumacher (migrated from Bugzilla):
Thanks for the report and the detailed instructions. I can reproduce the issue and will look into it.

@asfimport
Copy link
Collaborator Author

@FSchumacher (migrated from Bugzilla):
OK, I digged a bit deeper and this is a combination of two things. First you didn't specify a locale and therefore a default one is used, which is most probably an English based one. The second factor is the usage of the big Y instead of the small y. The big Y means week-based-year. The result might be surprising (it was to me, too), but correct. I think you want to use yyyy-MM-dd.

@asfimport
Copy link
Collaborator Author

todord (migrated from Bugzilla):
(In reply to Felix Schumacher from comment 2)

OK, I digged a bit deeper and this is a combination of two things. First you
didn't specify a locale and therefore a default one is used, which is most
probably an English based one. The second factor is the usage of the big Y
instead of the small y. The big Y means week-based-year. The result might be
surprising (it was to me, too), but correct. I think you want to use
yyyy-MM-dd.

Thanks for the response, this was good to know, the small y fixed the problem for me.

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

No branches or pull requests

1 participant