in reply to Help with time 2

I suspect you are passing 2003 into $year2, making mktime() croak. Also, I don't see a reference above to adding one to $mon to make it be as expected.

I would strongly suggest you store the raw timestamp value in $FORM{'userTime'}. This way, you don't need to parse it, or decode it. As long as you have control over userTime, this is safe.