fix tm_to_time logic for number of days in november

report/patch by Hiltjo Posthuma <hiltjo@codemadness.org>