Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
8873 Lượt xem

Hi Friends,

I am using Odoo9. I need to display particular date time field's value as '2015-10-25 09:00:00', in databse it is stored as '2015-10-25 09:00:00',

while it is displayed in front end(odoo form level) as '2015-10-25 14:30:00'. Is anyone have idea on how to display same as database date time as UTC (If i have change UTC timezone as system it is working fine, I dont want to follow this idea) .Thanks in advance.

Ảnh đại diện
Huỷ bỏ

Did you try to change tz in the context?

Câu trả lời hay nhất

the time showed in the front end is total of  , (backend time + gmt)

in your question the backend time is 9:00 and front end time is 14:30

and your gmt is 5:30 so if you want to show the exact time as the backend you have to subtract the gmt from front end


Ảnh đại diện
Huỷ bỏ
Tác giả

Cant use timedelta for timezone issue.

check my new answer

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 2 22
4569
Take Users Timezone Đã xử lý
3
thg 7 25
3882
3
thg 7 25
3197
1
thg 1 24
1451
Time & Date Issue Đã xử lý
6
thg 9 19
11174