+ 17

Why my time program is not showing the current time?

import datetime def time(): now = datetime.datetime.now() Time = now.strftime('%H hr:%M min:%S sec') return'Current time:' + Time print(time()) #thanks!

8th Feb 2017, 1:19 PM
Akbar Zack Raheem
Akbar Zack Raheem - avatar
2 Respuestas
+ 11
I just executed... right now! output says》 current time: 14 hrs:14 min:01sec
8th Feb 2017, 2:47 PM
Akbar Zack Raheem
Akbar Zack Raheem - avatar
+ 3
Actually it is working when I executed it
8th Feb 2017, 2:41 PM
Ms Arnold
Ms Arnold - avatar