cherry pick server time check from 8.5 branch

pulling this code from 8.5 branch