UNIX time and max int's

Dec 3, 2011 at 4:11am
I was browsing around the internet today when i was thinking about the whole unix time reaching the overflowing integer on 2038 and i have a few questions about that.

So first of all why is the unix time saved as a signed integer? The year will never need to be negative right?

And also it seems that to overflow the 64-bit integer will be LOOONG time (December 292,277,026,596) so the max int is pretty astounding with 64 bit (something i could use in my programming somtimes tbh) - But my machine is windows 7 64 bit yet my MAX_INT seems to cap out at the 32-bit range - thats my biggest question is how do i make use of my 64 bit machines 64 bit int in programming?
Dec 3, 2011 at 4:44am
The time is is stored as seconds since the beginning of 1970. So the first moon landing for example was at unix time -16774941.
Dec 3, 2011 at 5:08am
how do i make use of my 64 bit machines 64 bit int in programming?
You have to compile for x86-64 (aka x64, AMD64, and EM64T). Needless to say, the programs won't run on Win32.
Last edited on Dec 3, 2011 at 5:08am
Dec 3, 2011 at 5:18am
i find this in my compilers settings/options ? or is this a complicated thing
Dec 3, 2011 at 5:46am
Yes, it should be a compiler option, but note that you won't even have the option if you're using VC++ Express.
Topic archived. No new replies allowed.