code: def transform_unix_to_datetime(timestamp):
      
      if not isinstance(timestamp, float) and not isinstance(timestamp, int):
          raise TypeError('timestamp should be a float or int, but we got {}'.format(type(timestamp)))
  
      date_type = datetime.fromtimestamp(timestamp)
      return date_type
docs: 将 unix 时间戳转换成 datetime 类型
  
      :param:
          * timestamp: (int) unix 时间戳
      :return:
          * data_type: (datetime) datetime 类型实例
  
      举例如下::
  
          print('--- transform_unix_to_datetime demo ---')
          import time
          timestamp = int(time.time())
          date_type = transform_unix_to_datetime(timestamp)
          print(type(date_type))
          print(date_type)
          
          print('---')
  
      执行结果::
  
          --- transform_unix_to_datetime demo ---
          <class 'datetime.datetime'>
          2018-08-22 19:48:03
          ---