0

I want to ask about the datetime field in odoo, if all the datetime fields are added 7 hours, what is the reason ? This is happening on the client server, my display is normal,. thank you in advance

date_order = fields.Datetime('Order Date', required=True, states=READONLY_STATES, index=True, copy=False, default=fields.Datetime.now,\
        help="Depicts the date where the Quotation should be validated and converted into a purchase order.")

enter image description here

tdelaney
  • 63,514
  • 5
  • 71
  • 101

2 Answers2

0

Client server is in a different time zone than you. You need to use time zone aware datetime.

See this link for more info: How to make a timezone aware datetime object in Python?

Zach Johnson
  • 1,787
  • 3
  • 20
  • 36
0

Odoo stores Datetime fields as UTC times and the displayed time depends on your client's timezone.

The timezone can be set in the user preferences menu

Derick
  • 139
  • 6