Skip to Content
मेन्यू
This question has been flagged
1 Reply
21684 Views
Best Answer

Hello Giezel Esteves,

     You have to use ORM methods to convert the datetime data to Different TZ(Time Zone).

     import pytz
    user_tz = self.env.user.tz or pytz.utc
    local = pytz.timezone(user_tz)
    display_date_result = datetime.strftime(pytz.utc.localize(datetime.strptime(your_date_or_datetime_info,
    DEFAULT_SERVER_DATETIME_FORMAT)).astimezone(local),"%d/%m/%Y %H:%M%S") 

Avatar
Discard
Related Posts Replies Views Activity
3
जुल॰ 23
27269
2
जून 22
5802
2
सित॰ 21
4761
1
नव॰ 20
8069
2
मार्च 19
6195