cherry pick server time check from 8.5 branch

pulling this code from 8.5 branch
I'm into handling all of this a lot more elegantly later, I just wanted to have something that will save us 2 hours of weird troubleshooting on-site in case of bizzareness.