def get_location_time(self, time):
tz = self.env.user.tz or 'Asia/Shanghai'
local_format = "%Y-%m-%d %H:%M:%S"
time_str = str(time.astimezone(pytz.timezone(tz)).strftime(local_format))
return time_str
def get_location_time(self, time):
tz = self.env.user.tz or 'Asia/Shanghai'
local_format = "%Y-%m-%d %H:%M:%S"
time_str = str(time.astimezone(pytz.timezone(tz)).strftime(local_format))
return time_str