Based on accounts in the TWOV thread, for layovers greater than 8 hours, most of the immigration people will have mercy on you, and let you out, but this is a YMMV situation. My advice is to book (but, not pay for) a hotel, print out the confirmation, and show it to them. Obviously, if CA books it, your odds are better. I couldn't fathom spending 12 hours in the terminal.