from datetime import datetime


def secs_age(dt):
    """Get the number of seconds ago of a datetime object.

    Args:
        dt (:obj:`datetime.datetime`):
            Datetime object to calculate age in seconds of.

    Returns:
        :obj:`int`

    """
    # delta = 0 if dt is None else datetime.utcnow() - dt
    return 0 if not dt else (datetime.utcnow() - dt).seconds