big problem ahead

# It seems there will be still 32bit cpus with multiple cores that day
# so I do not even think what will happen ...

use strict;
my $now = (split /\s+/,scalar localtime time)[-1];
my $year = (localtime time)[5];
my $total= int 2**32/(365*24*3600);
print $now - $year + $total;
George [ Fr, 02 Februar 2007 10:18 ] [ ID #1616983 ]

Re: big problem ahead

George wrote:
> # It seems there will be still 32bit cpus with multiple cores that day
> # so I do not even think what will happen ...
>
> use strict;
> my $now = (split /\s+/,scalar localtime time)[-1];
> my $year = (localtime time)[5];
> my $total= int 2**32/(365*24*3600);
> print $now - $year + $total;

I don't understand why you posted all that.
Everybody knows about the Y2038 "problem".

perl -le 'print scalar gmtime(2**31-1)'
Tue Jan 19 03:14:07 2038
Joe Smith [ Sa, 03 Februar 2007 09:58 ] [ ID #1617759 ]
Perl » alt.perl » big problem ahead

Vorheriges Thema: Reprocessing the same file
Nächstes Thema: day of the week