Skip to content

Commit

Permalink
mudar timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
pixuimpou committed Oct 18, 2023
1 parent ee0c440 commit a8bb7f1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pipelines/rj_smtr/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,11 @@ def custom_serialization(obj: Any) -> Any:
Returns:
Any: Serialized object
"""
if isinstance(obj, (datetime, date, pd.Timestamp)):
if isinstance(obj, pd.Timestamp):
if obj.tzinfo is None:
obj = obj.tz_localize("UTC").tz_convert(
emd_constants.DEFAULT_TIMEZONE.value
)
# if obj.tzinfo is None:
# obj = obj.tz_localize(emd_constants.DEFAULT_TIMEZONE.value)
# else:
Expand Down

0 comments on commit a8bb7f1

Please sign in to comment.