You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by bl...@apache.org on 2022/11/16 16:07:04 UTC

[iceberg] branch master updated: Core: Add time zone info to LocalDate in ExpressionUtil tests (#6200)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new b76fff71e1 Core: Add time zone info to LocalDate in ExpressionUtil tests (#6200)
b76fff71e1 is described below

commit b76fff71e1f3554b3843c6f487e441c0fee8c4a9
Author: Eduard Tudenhöfner <et...@gmail.com>
AuthorDate: Wed Nov 16 17:06:57 2022 +0100

    Core: Add time zone info to LocalDate in ExpressionUtil tests (#6200)
---
 .../java/org/apache/iceberg/expressions/TestExpressionUtil.java     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/api/src/test/java/org/apache/iceberg/expressions/TestExpressionUtil.java b/api/src/test/java/org/apache/iceberg/expressions/TestExpressionUtil.java
index 5129d46871..56cf0afa46 100644
--- a/api/src/test/java/org/apache/iceberg/expressions/TestExpressionUtil.java
+++ b/api/src/test/java/org/apache/iceberg/expressions/TestExpressionUtil.java
@@ -538,7 +538,7 @@ public class TestExpressionUtil {
 
   @Test
   public void testSanitizeDateToday() {
-    String today = LocalDate.now().toString();
+    String today = LocalDate.now(ZoneOffset.UTC).toString();
 
     assertEquals(
         Expressions.equal("test", "(date-today)"),
@@ -558,7 +558,7 @@ public class TestExpressionUtil {
 
   @Test
   public void testSanitizeDateLastWeek() {
-    String lastWeek = LocalDate.now().minusWeeks(1).toString();
+    String lastWeek = LocalDate.now(ZoneOffset.UTC).minusWeeks(1).toString();
 
     assertEquals(
         Expressions.equal("test", "(date-7-days-ago)"),
@@ -578,7 +578,7 @@ public class TestExpressionUtil {
 
   @Test
   public void testSanitizeDateNextWeek() {
-    String nextWeek = LocalDate.now().plusWeeks(1).toString();
+    String nextWeek = LocalDate.now(ZoneOffset.UTC).plusWeeks(1).toString();
 
     assertEquals(
         Expressions.equal("test", "(date-7-days-from-now)"),