[Ilugc] Re: time_t date problem in 2038
ashwin kesavan iyengar
ashwin.chn at gmail.com
Tue Dec 6 08:59:29 IST 2005
On 12/6/05, Prem Kurian Philip <prem at songbirdtech.com> wrote:
> > Most of the support functions that use the time_t data type cannot handle
> > negative time_t values at all. They simply fail and return an error code.
> >This theory is based on thee fact that most computers today are 32-bit.
> But >as we are already seeing, computers migrating towards 64-bit
> computing. So >think of what would be the norm in 2038, where computers
> would be 64-bit or >higher say 128-bit. Which means this is not likely to
> occur even in 2068.
> >with regards,
> The move to 64-bit processor will not mitigate the need to make changes in
> the date handling functions and at the very least do a full re-compile. A
> lot of the date handling functions use OR and AND operations to pack date
> values - these will have to be modified.
> The problem is that 64-bit processors are normally run in "Compatibility
> mode" which essentially means that the processor will treat Integers as
> 32-bit values rather than the full 64-bit so as not to break applications
> which are compiled only with 32-bit support. However, the processor does
> support the running of both 64-bit and 32-bit apps at the same time.
> This is true for both AMD's and well as Intel's offerings. To understand
> this better, please read the documentation for these processors. AMD64 has
> two primary modes of operation - the "Long" mode and the "Legacy" mode.
> The long mode has two sub-modes - one being the 64-bit mode and the other
> being the "Compatibility Mode" which I wrote about.
> But yes, the situation is not that dire. A few minor changes in the date
> handling code and a full recompile will solve most issues.
AFAIK today's 64-bit processors are designed to support both 32-bit &
64-bit apps. This is because, as you might have already know, 32-bit
is dominant & most apps are designed to run on 32-bit,hence this
32-bit support. But as we see more & more 64-bit entering mainstream
(which includes home users b'cos they have a large user base & hence
their need to support them). So we would be seeing more codes for
64-bit computing. Hence i think the bug is not likely to surface in
the predicted time.
More information about the ilugc