Skip to content

Commit

Permalink
Merge pull request #4 from pajowu/pajowu/utc
Browse files Browse the repository at this point in the history
Use UTC time
  • Loading branch information
kostasdizas authored Jun 23, 2020
2 parents 84cde3e + 49d0689 commit 911347c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions activitywatch/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class ActivityWatchApi(object):
_last_heartbeat = datetime.now()
_last_heartbeat = datetime.utcnow()
freq = 10

def __init__(self, client_name, host, port, freq):
Expand Down Expand Up @@ -73,7 +73,7 @@ def ensure_bucket(self, bucket_id):
self.create_bucket(bucket_id)

def heartbeat(self, bucket_id, event_data, pulsetime=30):
now = datetime.now()
now = datetime.utcnow()

if not self._rate_limited(now):
return
Expand Down

0 comments on commit 911347c

Please sign in to comment.