Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Aug 11, 2024
1 parent 4173bbc commit 8506361
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commons_codec/transform/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def to_datetime(value: t.Any, on_error: t.Literal["raise", "ignore"] = "ignore")
import dateutil.parser

try:
return dateutil.parser.parse(value)
return dateutil.parser.parse(value).astimezone(dt.timezone.utc)
except (TypeError, dateutil.parser.ParserError) as ex:
logger.warning(f"Parsing value into datetime failed: {value}. Reason: {ex}")
if on_error == "ignore":
Expand Down

0 comments on commit 8506361

Please sign in to comment.