MyBB Community Forums

Full Version: [BUG] return in future is as past
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
When you set your forum status to away in the year 2222 it says that you cannot return in the past. Strange though.
You can change your forum status to away?
He means your user status - Away mode.

I'll verify this when I get home from work.
Chris Wrote:He means your user status - Away mode.
Yes that's exactly what I meant.I didn't think much before writing that.lol.
It's a PHP thing. See mktime() (MyBB uses gmmktime() but same thing).

On 32bit machines, the biggest year you can use is 2038. That's because a Unix timestamp records the number of seconds since 1970.... that's a VERY big number. In 2038, this number can no longer be represented by 32 bit machines. If MyBB is still around in 2030 (when this might be a problem), we won't be using 32 bit machines Wink.
Yeah indeed, decswxaqz is right.
So it is not a mybb bug, you can try it on anyother software that uses mktime() and see that the same happens.

For example whenever i set the year to 2222 on my local server, i get this message
Quote:Warning: gmmktime(): Windows does not support negative values for this function in d:\web\usercp.php on line 404
So appearantly it is a server related issue Smile
They have fixed the >= 1970 bug in php5. I do not know about this bug however.
I'll report this to the php bug site, but in the mean time should this be marked as limitation or bogus?
decswxaqz Wrote:It's a PHP thing. See mktime() (MyBB uses gmmktime() but same thing).

On 32bit machines, the biggest year you can use is 2038. That's because a Unix timestamp records the number of seconds since 1970.... that's a VERY big number. In 2038, this number can no longer be represented by 32 bit machines. If MyBB is still around in 2030 (when this might be a problem), we won't be using 32 bit machines Wink.

thats a false and misleading response.

32bit does not have this limit at all.

they said the same thing about windows 98 and the Y2K bug and the Y2K patch wasn't even needed. it was all a big load of crap.

i just proved you wrong by moving my system date from 2006 to 2099.

my machine is 32bit.

the problem is the software, not the machine.

also, btw.
the processor in little digital calenders is only 8bit, yet it can show dates up to 2006.

explain that.

The Actual limit on current OS software and hardware is 2099. and this will be averted by a patch most likely.
Quote:On systems where time_t is a 32bit signed integer, as most common today, the valid range for year is somewhere between 1901 and 2038, although this limitation is overcome as of PHP 5.1.0.
From the link I posted above.

MyBB uses the Unix timestamp for time/date storage. There are other methods that are not dependant on such large numbers, that is why your calculator can store the value 2006. It's not storing it as a unix timestamp. Unix timestamps provide a very easy method for calculating date and time differences. That is why it is prefered for forums. Static dates don't need such large storage requirements or calculations. For example, dates when an order has been processed can be static and stored up to any time. Mysql can store dates up to 9999-12-31.
Pages: 1 2