Created attachment 38122 [details] Specific values where the bug is present 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 2021-12-26.
Thanks for the report and the detailed instructions. I can reproduce the issue and will look into it.
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.
(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.
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/5598