Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Links 1.1 Isn't Y2K Compatible, Help!

Quote Reply
Links 1.1 Isn't Y2K Compatible, Help!
While i was trying to figure out how to get the name of the day in nph_build.cgi (such as Friday still need help with this) as a variable i can use i noticed that Links 1.1 is not Y2K compatible. This really sucks because it means at the stroke of midnight my website dies. Is there any fix for this?



------------------
The RelayMan
simsearch.hyperart.net
mdhealyjr@adelphia.net
Quote Reply
Re: Links 1.1 Isn't Y2K Compatible, Help! In reply to
The doomsayers have struck again.... first of all, at the stroke of midnight, your site is not going to die. At the absolute worst, your dates will be messed up.

The Y2K issue has already been addressed by Alex and there is a fix, but it will require you to upgrade to Links 1.11 or 2.0 unless you want to mess with changing code. You will also need to add '19' in front of the years when you migrate your database to the new version.
Quote Reply
Re: Links 1.1 Isn't Y2K Compatible, Help! In reply to
Ok, for the record, Links 1.1 is Y2K compatible. Instead of just saying it's not, please say what led you to this conclusion. Here's an output of some tests with the date handling routines date_to_unix and unix_to_date.

Code:
24-Feb-1999 => unix_time: 919843200 back to date => 24-Feb-1999
29-Feb-2000 => unix_time: 951811200 back to date => 29-Feb-2000

C:\Alex>perl test.pl
02-24-99 => unix_time: 919843200 back to date => 2-24-99
02-29-00 => unix_time: 951811200 back to date => 2-29-100

Here's the code if you want to try it yourself:

Code:
require "links.cfg";
print "24-Feb-1999 => unix_time: ", &date_to_unix('24-Feb-1999'),
" back to date => ", &unix_to_date (&date_to_unix('24-Feb-1999')), "\n";
print "29-Feb-2000 => unix_time: ", &date_to_unix('29-Feb-2000'),
" back to date => ", &unix_to_date (&date_to_unix('29-Feb-2000')), "\n";

The first test is with Links 1.1 and works as expected. The second test is with Links 1.0 which does have a Y2K issue as you notice the date says 100 instead of 00.

Now Links 1.0 is almost a year and a half old and wasn't out for very long. When I released 1.1 that was one of the major fixes.

If you have any questions about y2k compatibility, please don't hesitate to ask!

Cheers,

Alex
Quote Reply
Re: Links 1.1 Isn't Y2K Compatible, Help! In reply to
Acctually I'm not a doomsdayer, I'm against the big deal of the Y2K bug nothing will really explode or anything but there is a problem and it would effect many of the major functions of Links that I have install personally as my own private modification. Second, I ment Links 1.11.



------------------
The RelayMan
simsearch.hyperart.net
mdhealyjr@adelphia.net
Quote Reply
Re: Links 1.1 Isn't Y2K Compatible, Help! In reply to
Again, Links 1.11 IS y2k compliant. if your own mods are not, that is not Links' issue.

--Mark
Quote Reply
Re: Links 1.1 Isn't Y2K Compatible, Help! In reply to
 
Code:
my @days = qw!Sunday Monday Tuesday Wednesday Thursday Friday Saturday!;
my $day = $days[(localtime(time))[6]];

Alex
Quote Reply
Re: Links 1.1 Isn't Y2K Compatible, Help! In reply to
Thanks to all your help, especially Alex's I have created a Newsletter Mod like CGI-Resource's Newsletter which automatically sends out a news letter of the new sites for the last 7 days every Friday. The links are specially reconfigured to look good in the E-mail and display the name and link, the description, the date added, the site owner, and the owners e-mail. As soon as I perfect it to be faster and more configurable for other sites with options I'll release it publically.

Visit my website at <a href="http://www.simsearch.com">http://www.simsearch.com</a>


------------------
The RelayMan
simsearch.hyperart.net
mdhealyjr@adelphia.net