Skip to content

Commit

Permalink
fix timezone in time format string
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Merberg committed Oct 6, 2023
1 parent f165ea3 commit a9e09cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions metaflow/plugins/cards/card_modules/convert_to_native_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def _parse_pandas_column(column_object):
# and truncates it to 30 characters.
# If there is any form of TypeError or ValueError we set the column value to "Unsupported Type"
# We also set columns which are have null values to "null" strings
time_format = "%Y-%m-%dT%H:%M:%SZ"
time_format = "%Y-%m-%dT%H:%M:%S%Z"
truncate_long_objects = (
lambda x: x.astype("string").str.slice(0, 30) + "..."
if x.astype("string").str.len().max() > 30
Expand Down Expand Up @@ -365,7 +365,7 @@ def _parse_pandas_dataframe(self, data_object, truncate=True):
if truncate:
data = data_object.head()
index_column = data.index
time_format = "%Y-%m-%dT%H:%M:%SZ"
time_format = "%Y-%m-%dT%H:%M:%S%Z"

if "datetime64" in str(index_column.dtype):
if index_column.__class__.__name__ == "DatetimeIndex":
Expand Down

0 comments on commit a9e09cb

Please sign in to comment.