Skip to content

Commit 016cb69

Browse files
committed
do not use timestamp()
1 parent 28f0588 commit 016cb69

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

airbyte-cdk/python/airbyte_cdk/sources/declarative/datetime/datetime_parser.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,4 @@ def format(self, dt: datetime.datetime, format: str) -> str:
3232
# strftime("%s") is unreliable because it ignores the time zone information and assumes the time zone of the system it's running on
3333
# It's safer to use the timestamp() method than the %s directive
3434
# See https://stackoverflow.com/a/4974930
35-
if format == "%s":
36-
return str(int(dt.timestamp()))
37-
else:
38-
return dt.strftime(format)
35+
return dt.strftime(format)

0 commit comments

Comments
 (0)