def from_time(year=None, month=None, day=None, hours=None, minutes=None, seconds=None, microseconds=None, timezone=None):
 def str_or_stars(i, length):
  if (i is None):
   return ('*' * length)
  else:
   return str(i).rjust(length, '0')
 wmi_time = ''
 wmi_time += str_or_stars(year, 4)
 wmi_time += str_or_stars(month, 2)
 wmi_time += str_or_stars(day, 2)
 wmi_time += str_or_stars(hours, 2)
 wmi_time += str_or_stars(minutes, 2)
 wmi_time += str_or_stars(seconds, 2)
 wmi_time += '.'
 wmi_time += str_or_stars(microseconds, 6)
 if (timezone is None):
  wmi_time += '+'
 else:
  try:
   int(timezone)
  except ValueError:
   wmi_time += '+'
  else:
   if (timezone >= 0):
    wmi_time += '+'
   else:
    wmi_time += '-'
    timezone = abs(timezone)
    wmi_time += str_or_stars(timezone, 3)
 return wmi_time

def from_time ( year = None , month = None , day = None , hours = None , minutes = None , seconds = None , microseconds = None , timezone = None ) : def str_or_stars ( i , length ) : if ( i is None ) : return ( '*' * length ) else : return str ( i ) . rjust ( length , '0' ) wmi_time = '' wmi_time += str_or_stars ( year , 4 ) wmi_time += str_or_stars ( month , 2 ) wmi_time += str_or_stars ( day , 2 ) wmi_time += str_or_stars ( hours , 2 ) wmi_time += str_or_stars ( minutes , 2 ) wmi_time += str_or_stars ( seconds , 2 ) wmi_time += '.' wmi_time += str_or_stars ( microseconds , 6 ) if ( timezone is None ) : wmi_time += '+' else : try : int ( timezone ) except ValueError : wmi_time += '+' else : if ( timezone >= 0 ) : wmi_time += '+' else : wmi_time += '-' timezone = abs ( timezone ) wmi_time += str_or_stars ( timezone , 3 ) return wmi_time
convenience wrapper to take a series of date/time elements and return a wmi time of the form yyyymmddhhmmss .