Importing Password Hashes from Drupal 7

I’ve successfully used the import/export extension to import a couple of users using this:

function convert({ mail, pass }) {
  const buf = Buffer.from(pass, 'base64');
  const settings = buf.slice(0, 4);
  const salt = buf.slice(4, 12);
  const hash = buf.slice(12);
  return {
    "email": mail,
    "email_verified": true,
    "custom_password_hash": {
        "algorithm": "sha512",
        "hash": {
            "value": hash.toString('base64'),
            "encoding": "base64"
        },
        "salt": {
            "value": salt.toString('base64'),
            "position": "prefix"
        }
    }
  };
}

When I use the test login form as the imported user it recognises my email and seems to accept my password but wants me to change my password as its the first time I’ve logged in. This of course negates the purpose. Am I missing a parameter?

Reading the docs it looks like the ‘password_set_date’ field might help but it isn’t clear.

Thanks for your help

Julian