The time stamp variable is 32 bits long. Only 31 of these bits are used to store the number of seconds. The maximum number of seconds that can be accommodated is therefore 2,147,483,647. (I'll let you do the math)
Unix keeps track of dates by measuring seconds from Jan 1, 1970. I'm guessing that the number of seconds elapsed from Jan 1, 1970 will bring you into the year 2038 when the timestamp variable overflows.
Now that 64 bit computers are here, it's doubtful we'll all be here when the next overflow occurs.
Hope this helps.