implements timestamp checking for connect middleware