idontkno
|
  |
| Joined: 23 Dec 2007 |
| Total Posts: 2345 |
|
|
| 12 Aug 2011 03:41 PM |
"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? |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
| |
|
|
| 12 Aug 2011 03:42 PM |
| That's interesting. It will be like a time machine. |
|
|
| Report Abuse |
|
|
Roundel
|
  |
| Joined: 20 Mar 2010 |
| Total Posts: 469 |
|
|
| 12 Aug 2011 03:44 PM |
| Pokemon's highest amount of money possible is 999,999 credits. |
|
|
| Report Abuse |
|
|
|
| 12 Aug 2011 03:45 PM |
| 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. |
|
|
| Report Abuse |
|
|
|
| 12 Aug 2011 03:45 PM |
they could re make tick so it is seconds from the year 2038
~ Mitch ~ ~~ Dumbledoor ~~ |
|
|
| Report Abuse |
|
|
aboy5643a
|
  |
| Joined: 20 Nov 2010 |
| Total Posts: 2785 |
|
|
| 12 Aug 2011 03:47 PM |
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 ~ |
|
|
| Report Abuse |
|
|
Shobobo99
|
  |
| Joined: 30 Dec 2008 |
| Total Posts: 5754 |
|
|
| 12 Aug 2011 03:48 PM |
| Lol computers will think its 1901? Isn't that a paradox... considering they didn't even exist. |
|
|
| Report Abuse |
|
|
idontkno
|
  |
| Joined: 23 Dec 2007 |
| Total Posts: 2345 |
|
|
| 12 Aug 2011 03:55 PM |
| @shobobo99 lol ikr? thats kind of iron and funny :P |
|
|
| Report Abuse |
|
|
idontkno
|
  |
| Joined: 23 Dec 2007 |
| Total Posts: 2345 |
|
| |
|
Person299
|
  |
| Joined: 28 Feb 2008 |
| Total Posts: 7952 |
|
|
| 12 Aug 2011 04:13 PM |
| Why didn't they make it unsigned anyway? |
|
|
| Report Abuse |
|
|
|
| 12 Aug 2011 04:14 PM |
"Why didn't they make it unsigned anyway?"
What if you want dates before 1970? |
|
|
| Report Abuse |
|
|
| |
|
idontkno
|
  |
| Joined: 23 Dec 2007 |
| Total Posts: 2345 |
|
|
| 13 Aug 2011 03:31 PM |
| lol. the max number seems so random too. |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2011 03:34 PM |
"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 ◕ ‿‿ ◕ |
|
|
| Report Abuse |
|
|
Roundel
|
  |
| Joined: 20 Mar 2010 |
| Total Posts: 469 |
|
|
| 13 Aug 2011 03:34 PM |
| The max number is 2^31-1 because it's a 32 bits. |
|
|
| Report Abuse |
|
|
idontkno
|
  |
| Joined: 23 Dec 2007 |
| Total Posts: 2345 |
|
|
| 13 Aug 2011 09:00 PM |
| hows 2^31-1 come from 32 bits? |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2011 09:07 PM |
| @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. |
|
|
| Report Abuse |
|
|
PsychoBob
|
  |
| Joined: 08 Jul 2009 |
| Total Posts: 11047 |
|
|
| 13 Aug 2011 09:47 PM |
| I think it was Unix's fault for making it a signed integer rather than unsigned. |
|
|
| Report Abuse |
|
|
xSIXx
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 9202 |
|
|
| 13 Aug 2011 09:49 PM |
| ROBLOX will be dead by that time. |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2011 09:52 PM |
"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. |
|
|
| Report Abuse |
|
|
jode6543
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 5363 |
|
| |
|
belial52
|
  |
| Joined: 10 Oct 2009 |
| Total Posts: 8074 |
|
|
| 13 Aug 2011 10:07 PM |
| I thought it was supposed to reset to 0 at that time... |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2011 10:31 PM |
"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 |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2011 11:00 PM |
| Too bad tick() doesn't even return an integer. |
|
|
| Report Abuse |
|
|