aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2018-10-12 17:53:57 +0100
committerGravatar jesopo2018-10-12 17:53:57 +0100
commit278ab7d76fb499ca11c0d1eb6752fceb7209ca5d (patch)
tree12e3f43b3a0e88281e091804748f3e884249852c /modules
parentImplement 4-times-daily lottery in module/coins.py and address all stderrs to (diff)
signature
Use UTC in modules/coins.py
Diffstat (limited to 'modules')
-rw-r--r--modules/coins.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/coins.py b/modules/coins.py
index 78c63f8b..813ca779 100644
--- a/modules/coins.py
+++ b/modules/coins.py
@@ -39,13 +39,13 @@ class Module(object):
time.time()+self._until_next_6_hour())
def _until_next_hour(self, now=None):
- now = now or datetime.datetime.now()
+ now = now or datetime.datetime.utcnow()
until_next_hour = 60-now.second
return until_next_hour+((60-(now.minute+1))*60)
def _until_next_6_hour(self):
- now = datetime.datetime.now()
+ now = datetime.datetime.utcnow()
until_next_hour = self._until_next_hour(now)
- until_next_6_hour = 6 - (datetime.datetime.now().hour % 6)
+ until_next_6_hour = 6 - (now.hour % 6)
until_next_6_hour = until_next_6_hour*HOUR_MILLISECONDS
return until_next_hour+until_next_6_hour