Skip to content

Commit 74ed2bc

Browse files
committed
fix failed tests
1 parent acad5fc commit 74ed2bc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

flink-python/pyflink/table/tests/test_udf.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -982,9 +982,7 @@ def eval(self, col):
982982
"non-callable-udf", udf(Plus(), DataTypes.BIGINT(), DataTypes.BIGINT()))
983983

984984
def test_data_types(self):
985-
timezone = self.t_env.get_config().get_local_timezone()
986-
local_datetime = pytz.timezone(timezone).localize(
987-
datetime.datetime(1970, 1, 1, 0, 0, 0, 123000))
985+
local_datetime = datetime.datetime(1970, 1, 1, 0, 0, 0, 123000, datetime.timezone.utc)
988986

989987
@udf(result_type=DataTypes.TIMESTAMP_WITH_LOCAL_TIME_ZONE(3))
990988
def local_zoned_timestamp_func(local_zoned_timestamp_param):
@@ -1006,7 +1004,7 @@ def local_zoned_timestamp_func(local_zoned_timestamp_param):
10061004
.execute_insert(sink_table) \
10071005
.wait()
10081006
actual = source_sink_utils.results()
1009-
self.assert_equals(actual, ["+I[1969-12-31T16:00:01.123Z]"])
1007+
self.assert_equals(actual, ["+I[1970-01-01T00:00:00.123Z]"])
10101008

10111009
def test_execute_from_json_plan(self):
10121010
# create source file path

0 commit comments

Comments
 (0)