Operating System - HP-UX
1834771 Members
3195 Online
110070 Solutions
New Discussion

Unix time value - 10 digits?

 
SOLVED
Go to solution
Clara Rowe
Frequent Advisor

Unix time value - 10 digits?

Hi Experts,
A concerned user sent me the notification below. Could you please give me your opinions?
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

UNIX GURU UNIVERSE & UNIX911.com
UNIX HOT TIP
Unix Tip 1680 - August 7, 2001
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


YET ANOTHER COUNTDOWN
The unix time() value will rollover
to 10 digits for the first time in
modern computer history starting
Saturday Sept 8th,2001. The
timestamp will be 10 digits long,
and not 9.

Here?s a short Perl script to
compute the time left:

#!/usr/bin/perl -w
use strict;

my $now=time();
my $target=?1000000000?;
my
($sec,$min,$hrs,$dom,$mon,$year,$wday,$yday,$isdst)=localtime($target
$now);
my $now_string=localtime(time());
my $target_string=localtime($target);
my $message=qq{today is $now_string\n$mon months $dom days $hrs
hours $min minutes $sec seconds left till U1e9
($target_string)\n};
print $message;



This tip generously supported by: scooper@absolutemadness.com

Clara
Take time to smell the roses.
4 REPLIES 4
Robin Wakefield
Honored Contributor
Solution

Re: Unix time value - 10 digits?

Clara,

http://www.electromagnetic.net/press-releases/unixonebln.php

"should" reassure you...have a read of the last paragraph of the first section.

Robin.

James R. Ferguson
Acclaimed Contributor

Re: Unix time value - 10 digits?

Hi Clara:

This was know and widely disseminated in the year or so before 2000. If you're are storing or displaying the number of seconds since the epoch, then this is useful information.

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: Unix time value - 10 digits?

Hi Clara,

The 10 decimal digits is no big deal as this is no 'magic' binary representation. The big crunch will happen in January, 2038 when we exceed 32-bit representation. The only possible
downside (and this was discussed prior to Y2K)
are those programs which for some reason use this representation to generate string values
which might overflow.

Clay


If it ain't broke, I can fix that.
Clara Rowe
Frequent Advisor

Re: Unix time value - 10 digits?

Thanx everyone. I thought there was no reason for concern. But I knew you guys would have the full story. I appreciate you all responding.

Clara
Take time to smell the roses.