The tm_wday field had been left uninitialized, which was causing some assertions to fail on Windows unit tests. Fixes bug 18977.