lkml.org 
[lkml]   [1998]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Y2k
On Tue, 17 Mar 1998, Eje.Gustafsson@ffa.se wrote:

> If the time() function is correctly working under Linux there shouldn't
> be any problem until 2038. time() returns the time since 00:00:00 GMT,
> January 1, 1970, measured in seconds and stores this in a 32 bit long
> int. So if everything is done right with the filesystems and other stuff
Not quite so. time(2) returns a time_t value and time_t is NOT defined to be a
32-bit integer. It is dependent on the OS what size does time_t have. So every
code which expects and uses time_t and doesn't cast it to a 32 bit (or
smaller) integer, will work just fine. The current Linux kernels use a native
integer size of the underlying architecture as the return type of the sys_time
call, but I think there should be no problem changing it to a hard-coded
64-bit integer if such need arises.

l8r, marek
---
"Little prigs and three-quarter madmen may have the conceit that the
laws of nature are constantly broken for their sakes."
Friedrich Nietzsche


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.030 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site