The _timeshift function does not work with a formatter of the form "yyyy-MM-DD'T'HH:mm:ssXXX". This is due to the fact that internally a LocalDateTime is used instead of a ZonedDateTime. An exception java.time.temporal.UnsupportedTemporalTypeException with text Unsupported field: OffsetSeconds is thrown. Can be easily tested with the function helper ${__timeShift(yyyy-MM-DD'T'dd:HH:mm:ss.SSSZ,,P2D,,)} I think this could be very easily fixed and make a great tool even greater. As a workaround I created a bean shell script working with ZonedDateTime.
Thanks for the report and the nice words about JMeter. Could you test the next nightly, if the changes fix your problems? If they do, you can close this bug. commit 40db97b6dc1ca2460bf78d28d5368c83a4345869 AuthorDate: Fri Jan 10 18:12:47 2020 +0100 _timeshift function does not work with offset formatters Bugzilla Id: 64070 --- .../org/apache/jmeter/functions/TimeShift.java | 40 ++++++++++++---------- .../jmeter/functions/TestTimeShiftFunction.java | 17 +++++++++ xdocs/changes.xml | 2 ++ 3 files changed, 41 insertions(+), 18 deletions(-)
Tested the nightly build from 10.01.2020. It works now, thanks for the quick fix.
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/5224