This is an automated email from the ASF dual-hosted git repository.

pmouawad pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new cd521bd  TimeShift: use systemDefaultZoneID instead of calling 
ZoneId.systemDefault()
cd521bd is described below

commit cd521bdb2f224052ecb7e74c3a98c9bb7c7e5f4f
Author: pmouawad <p.moua...@ubik-ingenierie.com>
AuthorDate: Sun Oct 13 14:46:41 2019 +0200

    TimeShift: use systemDefaultZoneID instead of calling
    ZoneId.systemDefault()
---
 .../src/main/java/org/apache/jmeter/functions/TimeShift.java          | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/src/functions/src/main/java/org/apache/jmeter/functions/TimeShift.java 
b/src/functions/src/main/java/org/apache/jmeter/functions/TimeShift.java
index 438be1a..7f18444 100644
--- a/src/functions/src/main/java/org/apache/jmeter/functions/TimeShift.java
+++ b/src/functions/src/main/java/org/apache/jmeter/functions/TimeShift.java
@@ -158,7 +158,7 @@ public class TimeShift extends AbstractFunction {
                     localDateTimeToShift = LocalDateTime.parse(dateToShift, 
formatter);
                 } else {
                     localDateTimeToShift = 
LocalDateTime.ofInstant(Instant.ofEpochMilli(Long.parseLong(dateToShift)),
-                            ZoneId.systemDefault());
+                            systemDefaultZoneID);
                 }
             } catch (DateTimeParseException | NumberFormatException ex) {
                 log.error("Failed to parse the date '{}' to shift with 
formatter '{}'",
@@ -182,7 +182,7 @@ public class TimeShift extends AbstractFunction {
         if (formatter != null) {
             dateString = localDateTimeToShift.format(formatter);
         } else {
-            ZoneOffset offset = 
ZoneId.systemDefault().getRules().getOffset(localDateTimeToShift);
+            ZoneOffset offset = 
systemDefaultZoneID.getRules().getOffset(localDateTimeToShift);
             dateString = 
String.valueOf(localDateTimeToShift.toInstant(offset).toEpochMilli());
         }
 

Reply via email to