idontknoJoin Date: 2007-12-23 Post Count: 2345 |
"The number 2,147,483,647 is also the maximum value for a 32-bit signed integer in computing. It is therefore the maximum value for variables declared as int in many programming languages running on popular CPUs, and the maximum possible score (or amount of money) for many video games."
That is also true for roblox.
tick() = Unix time
Unix: "is a 32-bit signed integer counting the number of seconds since the start of the Unix epoch (midnight UTC of 1 January 1970)"
The problem occurs at 03:14:07 UTC on Tuesday, 19 January 2038, when the integer time value will reach the max integer value of 2,147,483,647, and malfunction. 1 second later, the time malfunctions and will display
-2,147,483,648, causing programs to think the year to be 1901.
I came across this the other day and thought this was an interesting matter. This problem will will adversly affect many programs, not just roblox.
What are your opinions? What do you think roblox and everything else affected by this will do? |
|
bloccoJoin Date: 2008-08-14 Post Count: 29474 |
noduh? |
|
|
That's interesting. It will be like a time machine. |
|
RoundelJoin Date: 2010-03-20 Post Count: 469 |
Pokemon's highest amount of money possible is 999,999 credits. |
|
|
Good thing most systems are moving to long ints now to avoid this problem! I presume Lua will also use a 64-bit integer for Unix time by then as well if it already doesn't, so there shouldn't be a large problem. |
|
|
they could re make tick so it is seconds from the year 2038
~ Mitch ~
~~ Dumbledoor ~~ |
|
aboy5643aJoin Date: 2010-11-20 Post Count: 2785 |
No the biggest number is 45 billion.
~Post here if you're Viet Namese, Canadian or Chinese. I'm from these 3 places. - Some confused kid from Language Center ~ |
|
Shobobo99Join Date: 2008-12-30 Post Count: 5754 |
Lol computers will think its 1901? Isn't that a paradox... considering they didn't even exist. |
|
idontknoJoin Date: 2007-12-23 Post Count: 2345 |
@shobobo99 lol ikr? thats kind of iron and funny :P |
|
idontknoJoin Date: 2007-12-23 Post Count: 2345 |
ironic* |
|
Person299Join Date: 2008-02-28 Post Count: 7952 |
Why didn't they make it unsigned anyway? |
|
|
"Why didn't they make it unsigned anyway?"
What if you want dates before 1970? |
|
|
idontknoJoin Date: 2007-12-23 Post Count: 2345 |
lol. the max number seems so random too. |
|
|
"What if you want dates before 1970"
69 years isn't all that useful to go back.
Anyway, I thought the time stamp was supposed to be the count of how long PAST 1970.
It shouldn't be signed, and it will be promoted to 64 bits soon if it hasn't already.
-NecroBumpist, Master of Lua, Writer of Wikis ◕ ‿‿ ◕ |
|
RoundelJoin Date: 2010-03-20 Post Count: 469 |
The max number is 2^31-1 because it's a 32 bits. |
|
idontknoJoin Date: 2007-12-23 Post Count: 2345 |
hows 2^31-1 come from 32 bits? |
|
|
@Idontkno: 2^31 because you only get 31 bits for the actual numbers, the 32nd bit is the sign bit determining if it's positive or negative. The subtraction of one is because of the way binary is. |
|
PsychoBobJoin Date: 2009-07-08 Post Count: 11047 |
I think it was Unix's fault for making it a signed integer rather than unsigned. |
|
|
|
"I think it was Unix's fault for making it a signed integer rather than unsigned."
Once again: What if you want times before 1970? You may think that they either aren't useful or you could use some other date storage format, but Unix time is a simple format and takes up less memory in comparison, and is easier to add time to than other formats. |
|
jode6543Join Date: 2009-06-16 Post Count: 5363 |
Wikipedia much...? |
|
belial52Join Date: 2009-10-10 Post Count: 8074 |
I thought it was supposed to reset to 0 at that time... |
|
|
"69 years isn't all that useful to go back.
Anyway, I thought the time stamp was supposed to be the count of how long PAST 1970.
It shouldn't be signed, and it will be promoted to 64 bits soon if it hasn't already.
-NecroBumpist, Master of Lua, Writer of Wikis ◕ ‿‿ ◕ "
LOL 69 |
|
|
Too bad tick() doesn't even return an integer. |
|