22 Eylül 2007 Cumartesi

January 19, 2038

03:14:07 UTC on Tuesday, January 19, 2038

The year 2038 problem may cause some computer software to fail before or in the year 2038. The problem affects programs that use the POSIX time representation, which represents system time as the number of seconds (ignoring leap seconds) since January 1, 1970. This representation is standard in Unix-like operating systems and also affects software written for most other operating systems because of the broad deployment of C. On most 32-bit systems, the time_t data type used to store this second count is a signed 32-bit integer. The latest time that can be represented in this format, following the POSIX standard, is 03:14:07 UTC on Tuesday, January 19, 2038. Times beyond this moment will "wrap around" and be represented internally as a negative number, and cause programs to fail, since they will see these times not as being in 2038 but rather in 1901. Erroneous calculations and decisions may therefore result.

time_t time()

#include < stdio.h >
#include < time.h >

int main(void)
time_t now;
struct tm ts;
char buf[80];

// Get the current time

// Format and print the time, "ddd yyyy-mm-dd hh:mm:ss zzz"
ts = *localtime(&now);
strftime(buf, sizeof(buf), "%a %Y-%m-%d %H:%M:%S %Z", &ts);
printf("%s\n", buf);

return 0;

2 yorum:

machinecity dedi ki...

oh no!

machinecity dedi ki...

May 28, 60056

NTFS is going to fail :)