FTSO MacPerl. Dates are implemented in the non-standard way of starting from 1904 instead of 1970. As a result, we must add back those lost years in order to get cross platform compatibility with other perl time implementations. Please shoot me.

This commit is contained in:
cyeh%netscape.com 1998-09-01 01:31:32 +00:00
Родитель 8d9e2c2cc9
Коммит 628430e63f
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -106,6 +106,12 @@ sub set_bomb {
unless ($warning_days < $bomb_days); unless ($warning_days < $bomb_days);
my $now = time; my $now = time;
# MacPerl stores date and times from 1904 instead of 1970
# Let's do the timewarp again!
$now = $now + (66 * 365 * 24 * 60 * 60);
my $bomb = $now + ($bomb_days * 24 * 60 * 60); my $bomb = $now + ($bomb_days * 24 * 60 * 60);
my $warn = $now + ($warning_days * 24 * 60 * 60); my $warn = $now + ($warning_days * 24 * 60 * 60);