in reply to A month behind the times...
localtime returns months as 0..11 not 1..12. Check the localtime for the full spec. It also lists days of the week as 0..6