diff --git a/src/snowflake/snowpark/mock/_pandas_util.py b/src/snowflake/snowpark/mock/_pandas_util.py index 7ff3027e72..e4c9927e83 100644 --- a/src/snowflake/snowpark/mock/_pandas_util.py +++ b/src/snowflake/snowpark/mock/_pandas_util.py @@ -95,7 +95,10 @@ def _extract_schema_and_data_from_pandas_df( elif isinstance(plain_data[row_idx][col_idx], pd.Timestamp): if isinstance(data.dtypes.iloc[col_idx], pd.DatetimeTZDtype): # this is to align with the current snowflake behavior that it - # apply the tz diff to time and then removes the tz information during ingestion + # apply the tz diff to time and then removes the tz information d + plain_data[row_idx][col_idx] = plain_data[row_idx][col_idx].tz_convert('UTC').tz_localize(None).strftime('%Y-%m-%d %H:%M:%S.%f') + else: + plain_data[row_idx][col_idx] = plain_data[row_idx][col_idx].strftime('%Y-%m-%d %H:%M:%S.%f')uring ingestion plain_data[row_idx][col_idx] = ( plain_data[row_idx][col_idx] .tz_convert("UTC")