Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #28 from SafetyCulture/intg-311_implement_media_sy…
Browse files Browse the repository at this point in the history
…nc_offset

[INTG-311] datetime.now -> datetime.utcnow
  • Loading branch information
Dimitri Koubaroulis authored May 17, 2017
2 parents 1236e82 + c467f5e commit 22e4279
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/exporter/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ def sync_exports(logger, sc_client, settings):
for audit in results['audits']:
logger.info('Processing audit (' + str(export_count) + '/' + str(export_total) + ')')
modified_at = dateutil.parser.parse(audit['modified_at'])
now = datetime.datetime.now()
now = datetime.datetime.utcnow()
elapsed_time_difference = (pytz.utc.localize(now) - modified_at)
if elapsed_time_difference > datetime.timedelta(seconds=media_sync_offset):
export_count += 1
Expand Down

0 comments on commit 22e4279

Please sign in to comment.