You are getting integer math'ed - unless specified otherwise, numeric constants are ints - 16-bit signed integers - so the math is done with 16-bit int's, even though you're assigning the result to an unsigned long.
So the 1000 * 60 * 60 * 12 overflows, and works out to only 11776 (about 12 seconds)
Change it to 1000UL * 60 * 60 *12 to force it to do the intermediate calculations as unsigned longs, and you'll get the right result.