Skip to content

Commit 8bcc43c

Browse files
maxi297aaronsteers
andauthored
Update airbyte_cdk/sources/declarative/interpolation/macros.py
Co-authored-by: Aaron ("AJ") Steers <[email protected]>
1 parent 23afeac commit 8bcc43c

File tree

1 file changed

+2
-1
lines changed
  • airbyte_cdk/sources/declarative/interpolation

1 file changed

+2
-1
lines changed

airbyte_cdk/sources/declarative/interpolation/macros.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ def format_datetime(
177177
dt_datetime = (
178178
datetime.datetime.strptime(dt, input_format) if input_format else str_to_datetime(dt)
179179
)
180-
dt_datetime = dt_datetime.replace(tzinfo=pytz.utc)
180+
if dt_datetime.tzinfo is None:
181+
dt_datetime = dt_datetime.replace(tzinfo=pytz.utc)
181182
return DatetimeParser().format(dt=dt_datetime, format=format)
182183

183184

0 commit comments

Comments
 (0)