docs: def check_time_param(t):
      """Check whether a string sent in matches the ISO8601 format.  If a
      Datetime object is passed instead, it will be converted into an ISO8601
      compliant string.
  
      :param t: the datetime to check
      :type t: string or Datetime
      :rtype: string"""
  
      if type(t) is str:
          if not ISO.match(t):
              raise ValueError('Date string "%s" does not match ISO8601 format' %
                               (t))
          return t
      else:
          return t.isoformat()