def lastsave(host=None, port=None, db=None, password=None):
    '''
    Get the UNIX time in seconds of the last successful save to disk

    CLI Example:

    .. code-block:: bash

        salt '*' redis.lastsave
    '''
    # Use of %s to get the timestamp is not supported by Python. The reason it
    # works is because it's passed to the system strftime which may not support
    # it. See: https://stackoverflow.com/a/11743262
    server = _connect(host, port, db, password)
    if six.PY2:
        return int((server.lastsave() - datetime(1970, 1, 1)).total_seconds())
    else:
        return int(server.lastsave().timestamp())
def lastsave ( host = None , port = None , db = None , password = None ) : server = _connect ( host , port , db , password ) if six . PY2 : return int ( ( server . lastsave ( ) - datetime ( 1970 , 1 , 1 ) ) . total_seconds ( ) ) else : return int ( server . lastsave ( ) . timestamp ( ) )
Get the UNIX time in seconds of the last successful save to disk

    CLI Example:

    .. code-block:: bash

        salt '*' redis.lastsave