From 77bd46e17ed10c96d82e5700f6ec2aaff0bff06b Mon Sep 17 00:00:00 2001 From: MitchellGale-BitQuill Date: Fri, 28 Oct 2022 13:37:48 -0700 Subject: [PATCH] Reverted reverted changes in ExprDateTimeValue. Reverted change in ExprDateValue.java for timestampValue to use systemDefault instead of UTC time. Signed-off-by: MitchellGale-BitQuill --- .../main/java/org/opensearch/sql/data/model/ExprDateValue.java | 2 +- .../java/org/opensearch/sql/data/model/ExprDatetimeValue.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/opensearch/sql/data/model/ExprDateValue.java b/core/src/main/java/org/opensearch/sql/data/model/ExprDateValue.java index 5aeebc9297..7617e156ba 100644 --- a/core/src/main/java/org/opensearch/sql/data/model/ExprDateValue.java +++ b/core/src/main/java/org/opensearch/sql/data/model/ExprDateValue.java @@ -69,7 +69,7 @@ public LocalDateTime datetimeValue() { @Override public Instant timestampValue() { - return ZonedDateTime.of(date, timeValue(), ZoneId.of("UTC")).toInstant(); + return ZonedDateTime.of(date, timeValue(), ZoneId.systemDefault()).toInstant(); } @Override diff --git a/core/src/main/java/org/opensearch/sql/data/model/ExprDatetimeValue.java b/core/src/main/java/org/opensearch/sql/data/model/ExprDatetimeValue.java index e20dbf14a2..f5f80f133f 100644 --- a/core/src/main/java/org/opensearch/sql/data/model/ExprDatetimeValue.java +++ b/core/src/main/java/org/opensearch/sql/data/model/ExprDatetimeValue.java @@ -71,7 +71,7 @@ public LocalTime timeValue() { @Override public Instant timestampValue() { - return ZonedDateTime.of(datetime, ZoneId.systemDefault()).toInstant(); + return ZonedDateTime.of(datetime, ZoneId.of("UTC")).toInstant(); } @Override