Fixes #17387.  Replace Date.setTime (buggy in Chrome) with previously buggy setHours.