+ 1
Can anyone tell me the error in this
It is taking wrong time, why? https://code.sololearn.com/cvxwVeoSPqXQ/?ref=app
2 Answers
+ 3
probably its printing the time where server is located not according to the location where user is ,
You can use this to get time according to country
import pytz
IST=pytz.timezone('Asia/Kolkata')
a=datetime.datetime.now(IST)
+ 1
Thanks, it helpedđ