def _get_datetime(instant):
 if (instant is None):
  return datetime_.utcnow()
 elif (isinstance(instant, integer_types) or isinstance(instant, float)):
  return datetime_.utcfromtimestamp(instant)
 elif isinstance(instant, time):
  return datetime_.combine(date.today(), instant)
 elif (isinstance(instant, date) and (not isinstance(instant, datetime))):
  return datetime_.combine(instant, time())
 return instant

def _get_datetime ( instant ) : if ( instant is None ) : return datetime_ . utcnow ( ) elif ( isinstance ( instant , integer_types ) or isinstance ( instant , float ) ) : return datetime_ . utcfromtimestamp ( instant ) elif isinstance ( instant , time ) : return datetime_ . combine ( date . today ( ) , instant ) elif ( isinstance ( instant , date ) and ( not isinstance ( instant , datetime ) ) ) : return datetime_ . combine ( instant , time ( ) ) return instant
get a datetime out of an "instant" .