code: def str2unixtime(ts, fmt='%Y-%m-%d %H:%M:%S'):
      
      t = time.strptime(ts, fmt)
      return int(time.mktime(t))
docs: 将固定格式的字符串转换成对应的时间戳到秒级别
  
      - 使用:
  
      >>> str2unixtime('2016-01-01 01:01:01')
      1451581261
  
      :param ts:
      :type ts:
      :param fmt:
      :type fmt:
      :return:
      :rtype: