Skip to content

Commit

Permalink
! use datetime.timestamp() instead of strftime() to get unix epoch
Browse files Browse the repository at this point in the history
  • Loading branch information
Montellese committed Jun 9, 2020
1 parent 9532849 commit e99c15d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ def execImport(handle: int, options: dict):

if fastSync:
log(f"performing fast syncronization of items viewed or updated since {str(lastSync)}")
lastSyncEpoch = parser.parse(lastSync).strftime('%s')
lastSyncEpoch = int(parser.parse(lastSync).astimezone(timezone.utc).timestamp())
updatedFilter = {'updatedAt>': lastSyncEpoch}
watchedFilter = {'lastViewedAt>': lastSyncEpoch}

Expand Down

0 comments on commit e99c15d

Please sign in to comment.