22import datetime
33from datetime import timezone , timedelta
44import pytest
5+ import pytz
56from databricks .sql .utils import (
67 convert_to_assigned_datatypes_in_column_table ,
78 parse_timestamp ,
@@ -235,7 +236,7 @@ def test_no_format_uses_dateutil(self):
235236 def test_matching_format_uses_strptime (self ):
236237 fmt = "%Y-%m-%d %H:%M:%S.%f"
237238 result = parse_timestamp ("2023-12-31 12:30:00.123000" , fmt )
238- assert result == datetime .datetime (2023 , 12 , 31 , 12 , 30 , 0 , 123000 )
239+ assert result == datetime .datetime (2023 , 12 , 31 , 12 , 30 , 0 , 123000 , tzinfo = pytz . UTC )
239240
240241 def test_non_matching_format_falls_back_to_dateutil (self ):
241242 fmt = "%Y-%m-%d %H:%M:%S.%f"
@@ -252,7 +253,7 @@ def test_convert_column_table_with_timestamp_format(self):
252253 result = convert_to_assigned_datatypes_in_column_table (
253254 column_table , description , timestamp_format = fmt
254255 )
255- assert result [0 ][0 ] == datetime .datetime (2023 , 12 , 31 , 12 , 30 , 0 )
256+ assert result [0 ][0 ] == datetime .datetime (2023 , 12 , 31 , 12 , 30 , 0 , tzinfo = pytz . UTC )
256257
257258 def test_convert_column_table_without_timestamp_format (self ):
258259 description = [
0 commit comments