Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/snowflake/snowpark/mock/_pandas_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Loading