def to_time(dt, tzinfo=None, format=None):
    """
    Convert a datetime to time with tzinfo
    """
    d = to_datetime(dt, tzinfo, format)
    if not d:
        return d
    return time_(d.hour, d.minute, d.second, d.microsecond, tzinfo=d.tzinfo)
def to_time ( dt , tzinfo = None , format = None ) : d = to_datetime ( dt , tzinfo , format ) if not d : return d return time_ ( d . hour , d . minute , d . second , d . microsecond , tzinfo = d . tzinfo )
Convert a datetime to time with tzinfo