可以调用这个 fields.datetime.context_timestamp,在context里面写入tz
def context_timestamp(cr, uid, timestamp, context=None):<br /> """Returns the given timestamp converted to the client's timezone.<br /> This method is *not* meant for use as a _defaults initializer,<br /> because datetime fields are automatically converted upon<br /> display on client side. For _defaults you :meth:`fields.datetime.now`<br /> should be used instead.<br /><br /> :param datetime timestamp: naive datetime value (expressed in UTC)<br /> to be converted to the client timezone<br /> :param dict context: the 'tz' key in the context should give the<br /> name of the User/Client timezone (otherwise<br /> UTC is used)<br /> :rtype: datetime<br /> :return: timestamp converted to timezone-aware datetime in context<br /> timezone<br /> """