Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
21677 Zobrazení
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
3
čvc 23
27266
2
čvn 22
5802
2
zář 21
4759
1
lis 20
8067
2
bře 19
6195