Hi guys,
from datetime import datetime
print datetime.now()
Output: 2016-11-21 11:21:36.471784
The time has 5:30 loss. So I solved temporarily
print datetime.now() + timedelta(hours=5.5)
Is it good method?
Why this variation ?
Thanks in advance
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi guys,
from datetime import datetime
print datetime.now()
Output: 2016-11-21 11:21:36.471784
The time has 5:30 loss. So I solved temporarily
print datetime.now() + timedelta(hours=5.5)
Is it good method?
Why this variation ?
Thanks in advance
Is your server time configured correctly?
I have set the timezone of administrator to Asia/Kolkata.
But result is same.
System time is 9:46, but time in odoo log is 2016-11-22 04:16:39,697
Hmm, is is stored in the database in UTC or do you see a difference there too?
I don't store time in database. I want to get current time to a variable.
is timedelta solution good?