+ 2
Could someone help me to get correct current time in python
from datetime import datetime Print(str(datetime.now()) Executing above two lines ,it prints some other time than current time in my zone. My cell has correct updated time in my zone where I am executing these lines. I executed above lines in code playground. could someone please help me to get correct time.
3 Réponses
+ 4
you have to understand that the code you wrote is being executed on a server and it returns its time as output . nothing is being executed on your phone.
+ 1
Your code is correct only.. This code do not work in sololearn. Because this were connected to sololearn server.. You can try in pydroid3 app..