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
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
8
May 23
|
58359 | ||
DateTime Python
Solved
|
|
4
Feb 23
|
68875 | |
|
1
Jan 23
|
1973 | ||
Time & Date Issue
Solved
|
|
6
Sep 19
|
9024 | |
|
2
Mar 16
|
6517 |
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?