def _to_ordinalf(dt):
if hasattr(dt, '<STR_LIT>') and dt.tzinfo is not None:<EOL><INDENT>delta = dt.tzinfo.utcoffset(dt)<EOL>if delta is not None:<EOL><INDENT>dt -= delta<EOL><DEDENT><DEDENT>base =  float(dt.toordinal())<EOL>if hasattr(dt, '<STR_LIT>'):<EOL><INDENT>base += (dt.hour/HOURS_PER_DAY + dt.minute/MINUTES_PER_DAY +<EOL>dt.second/SECONDS_PER_DAY + dt.microsecond/MUSECONDS_PER_DAY<EOL>)<EOL><DEDENT>return base<EOL>
Convert :mod:`datetime` to the Gregorian date as UTC float days,
preserving hours, minutes, seconds and microseconds.  Return value
is a :func:`float`.