def _from_ordinalf(x, tz=None):
    "\n    Convert Gregorian float of the date, preserving hours, minutes,\n    seconds and microseconds.  Return value is a :class:`datetime`.\n\n    The input date `x` is a float in ordinal days at UTC, and the output will\n    be the specified :class:`datetime` object corresponding to that time in\n    timezone `tz`, or if `tz` is `None`, in the timezone specified in\n    `rcParams['timezone']`.\n    "
    if (tz is None):
        tz = _get_rc_timezone()
    ix = int(x)
    dt = datetime.datetime.fromordinal(ix).replace(tzinfo=UTC)
    remainder = (float(x) - ix)
    dt += datetime.timedelta(microseconds=int((remainder * MUSECONDS_PER_DAY)))
    if (dt.microsecond < 10):
        dt = dt.replace(microsecond=0)
    elif (dt.microsecond > 999990):
        dt += datetime.timedelta(microseconds=(1000000.0 - dt.microsecond))
    return dt.astimezone(tz)
Convert Gregorian float of the date, preserving hours, minutes,
seconds and microseconds.  Return value is a :class:`datetime`.

The input date `x` is a float in ordinal days at UTC, and the output will
be the specified :class:`datetime` object corresponding to that time in
timezone `tz`, or if `tz` is `None`, in the timezone specified in
`rcParams['timezone']`.
def _from_ordinalf(x, tz=None):
    "\n    Convert Gregorian float of the date, preserving hours, minutes,\n    seconds and microseconds.  Return value is a :class:`datetime`.\n\n    The input date `x` is a float in ordinal days at UTC, and the output will\n    be the specified :class:`datetime` object corresponding to that time in\n    timezone `tz`, or if `tz` is `None`, in the timezone specified in\n    `rcParams['timezone']`.\n    "
    if (tz is None):
        tz = _get_rc_timezone()
    ix = int(x)
    dt = datetime.datetime.fromordinal(ix).replace(tzinfo=UTC)
    remainder = (float(x) - ix)
    dt += datetime.timedelta(microseconds=int((remainder * MUSECONDS_PER_DAY)))
    if (dt.microsecond < 10):
        dt = dt.replace(microsecond=0)
    elif (dt.microsecond > 999990):
        dt += datetime.timedelta(microseconds=(1000000.0 - dt.microsecond))
    return dt.astimezone(tz)