def to_datetime(timestamp):
    if isinstance(timestamp, datetime) or timestamp is None:
        return timestamp
    elif isinstance(timestamp, basestring):
        return dateutil.parser.parse(timestamp)
    else:
        raise Exception("Unable to convert %s to a datetime object." %
                        timestamp)
Returns a list of the default HTML attributes for the action.
dataset/ETHPy150Open Kloudless/kloudless-python/kloudless/util.py/to_datetime--crossover with--dataset/ETHPy150Open Havate/havate-openstack/proto-build/gui/horizon/Horizon_GUI/horizon/tables/actions.py/BaseAction.get_default_attrs