You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2020/01/10 15:46:02 UTC

[Bug 64070] New: _timeshift function does not work with offset formatters

https://bz.apache.org/bugzilla/show_bug.cgi?id=64070

            Bug ID: 64070
           Summary: _timeshift function does not work with offset
                    formatters
           Product: JMeter
           Version: 5.2
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: wolfm@t-systems.com
  Target Milestone: JMETER_6.0.0

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64070] _timeshift function does not work with offset formatters

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64070

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|PC                          |All
                 OS|                            |All
             Status|NEW                         |NEEDINFO
           Keywords|                            |FixedInTrunk

--- Comment #1 from Felix Schumacher <fe...@internetallee.de> ---
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(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64070] _timeshift function does not work with offset formatters

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64070

Markus Wolf <wo...@t-systems.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEEDINFO                    |RESOLVED

--- Comment #2 from Markus Wolf <wo...@t-systems.com> ---
Tested the nightly build from 10.01.2020. It works now, thanks for the quick
fix.

-- 
You are receiving this mail because:
You are the assignee for the bug.