Skip to content

Commit

Permalink
Changes datetime parser (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
vmesel authored Nov 17, 2023
1 parent 43eac43 commit 654957f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tap_hubspot_beta/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import time
import pytz
from singer_sdk.helpers._state import log_sort_error
from pendulum import parse

class AccountStream(hubspotV1Stream):
"""Account Stream"""
Expand Down Expand Up @@ -909,9 +910,7 @@ def post_process(self, row, context):
row = super().post_process(row, context)

rep_key = self.get_starting_timestamp(context).replace(tzinfo=pytz.utc)
archived_at = datetime.strptime(
row['archivedAt'], "%Y-%m-%dT%H:%M:%S.%fZ"
).replace(tzinfo=pytz.utc)
archived_at = parse(row['archivedAt']).replace(tzinfo=pytz.utc)

if archived_at > rep_key:
return row
Expand Down

0 comments on commit 654957f

Please sign in to comment.