![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Funny but true.... | naushad | UNIX for Dummies Questions & Answers | 6 | 03-26-2008 03:23 AM |
| how to exit a while true loop | Noob e | Shell Programming and Scripting | 5 | 08-26-2007 11:44 AM |
| why isn't the exit status true? | mjays | Shell Programming and Scripting | 5 | 04-04-2007 06:18 AM |
| True Shutdown help! | 01000101 | UNIX for Dummies Questions & Answers | 3 | 05-15-2006 04:36 PM |
| ksh [ HP True 64 v5.1 ] and HP-UX B.11.11i | krishna | Shell Programming and Scripting | 3 | 12-19-2005 01:47 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I have heard for a long time that in maybe 2039 Unix will no longer be useable due the length of the date value. Anyone know anything about this?
|
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
This is down to the time_t type being 32 bits on 32 bit machines.
It measures time in seconds from the start of the epoch, 1st Jan 1970. So 64 bit machines are not affected, you need to confirm how file systems store dates. There needs to be a binary level change to make time_t a "long long" or a 64 bit number. |
|
#3
|
|||
|
|||
|
For 32 bit time_t values
Code:
#include <time.h>
int main()
{
time_t lt=0x7fffffff;
printf(asctime(localtime(<)));
return 0;
}
Mon Jan 18 20:14:07 2038 If you add one second to that lt variable the result on my HPUX box is: Fri Dec 13 13:45:52 1901 -- a time in the past |
|
#4
|
|||
|
|||
|
Hi Jim ..
That is great i made thi is my unix Hp machine and executed #include <time.h> int main() { time_t lt=0x7fffffff; printf(asctime(localtime(<))); printf(asctime(localtime(<) + 1 )); return 0; } i got the result as Mon Jan 18 22:14:07 2038 and Sun Jan 0 00:00:00 1900 what is time_t lt=0x7fffffff; please explain .. Thanks in advance, Arun . |
|
#5
|
|||
|
|||
|
It's hex for the largest positive number a signed 32bit number can represent. -- sort of the end of time for 32 bit time_t numbers
2147483647 |
|||
| Google The UNIX and Linux Forums |