def dateTime(arg):
  """
	d may be:
		- datetime()
		- [y,m,d,h[,m[,ms]]]
		- [date(),time()]
		- [[y,m,d],[h,m,s,ms]]
		and permutations of above
	"""
  l = len(arg)
  if l is 1:
    dt = arg[0]
    typed = type(dt)
    if typed is datetime.datetime:
      return dt
    if typed in (tuple, list) and len(dt) in [5, 6, 7]:
      return datetime.datetime(*dt)
  if l is 2:
    date = time = None
    typeArg0 = type(arg[0])
    typeArg1 = type(arg[1])
    if typeArg0 in STR_TYPES:
      return datetime.datetime.strptime(arg[0], arg[1])
    if typeArg0 is datetime.date:
      d = arg[0]
      date = [d.year, d.month, d.day]
    if typeArg0 in (tuple, list):
      date = arg[0]
    if typeArg1 is datetime.time:
      t = arg[1]
      time = [t.hour, t.minute, t.second, t.microsecond]
    if typeArg1 in (tuple, list):
      time = arg[1]
    return datetime.datetime(*date + time)
d may be:
		- datetime()
		- [y,m,d,h[,m[,ms]]]
		- [date(),time()]
		- [[y,m,d],[h,m,s,ms]]
		and permutations of above