mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-15 23:32:17 +00:00
lets not concatenate strings and integers, hey?
This commit is contained in:
@@ -142,7 +142,7 @@ class OpTimerHandler(BaseHandler):
|
|||||||
dt = datetime.strptime(date,'%Y-%m-%d %H:%M:%S')
|
dt = datetime.strptime(date,'%Y-%m-%d %H:%M:%S')
|
||||||
now = datetime.utcnow()
|
now = datetime.utcnow()
|
||||||
startsIn = int(dt.strftime('%s')) - int(now.strftime('%s'))
|
startsIn = int(dt.strftime('%s')) - int(now.strftime('%s'))
|
||||||
duration = node.getAttribute('duration')
|
duration = int(node.getAttribute('duration'))
|
||||||
endsIn = startsIn + (duration * 60)
|
endsIn = startsIn + (duration * 60)
|
||||||
if startsIn < 0:
|
if startsIn < 0:
|
||||||
startsIn = 0
|
startsIn = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user