If settings in system preferences > date and time are unchecked , read and write permissions in guest user account , shared , home folder issues will come up in icloud keychain and may in login keychain , App Store , iTunes , in cloud website .
Various methods are there to rectify keychain .
If the Mac user has iCloud verification code in his records its easy to set up iCloud Keychain .
some articles are there OS X El Capitan: Set the date and time on your Mac
If you enter your iCloud Security Code incorrectly too many times - Apple Support
Another method is entering in recovery mode .
Change admin password in Mac OS Sierra
Close all applications and shut down the computer , press command , R and power key simultaneously , release only power key and keep on holding command and R key until apple logo appears , the bar starts loading let it be completed .
Select the language as English , go to utilities on top menu bar > Utilities > Terminal execute a command resetpassword and click on enter key .
Window appears , select your admin name it will prompt to enter Apple ID and password .once you enter the credentials , two options will be shown ( a ) previous ( b ) next , click on next .
Some fields will appear .
New password ……….
Verify password ……….
Password hint ……….
Enter your new password in two empty fields and keep password hint as empty ( optional ) .
It will again prompt two options ( a ) previous ( b ) next
Click on next .
Then it will prompt to restart the computer , so after restarting the machine .
The system was unable to unlock your login keychain , if you remember your old password you can update the keychain password .
If you do not remember your old password , you can create a new login keychain or choose to leave the login keychain using a different password .
Would you like to update the password , create a new keychain , or continue the login ?
A window will appear on your desktop .
( a ) continue login .
( b) create new keychain .
( c ) update keychain password .
Click on update keychain password , then log out from your computer .
When you again login in the fields enter your “ admin name “ and “ old admin password “ , so that new password will be updated with login keychain .
Hence , you have changed the admin password with the help of recovery mode only .
If keychain is corrupted , click on create new keychain , its a lengthy and complicated procedure , but every time iCloud verification is very much required .
See the steps , you must consult in apple support also .
Also , in Mac OS High Sierra , if keychain access is opened via spotlight , its preferences is opened .
Clicking on reset my default keychain can be done .

All the passwords will be emptied and you have to set up login keychain and iCloud Keychain once again ( make sure you must all of your passwords for webmail account , iCloud , Apple ID , if your are using airport express its base station or wireless network password generally both are kept as same ) before clicking on it .
Again stressing on iCloud verification code it has major role everywhere it can really help to configure .