зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
8d9e2c2cc9
Коммит
628430e63f
|
@ -106,6 +106,12 @@ sub set_bomb {
|
|||
unless ($warning_days < $bomb_days);
|
||||
|
||||
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 $warn = $now + ($warning_days * 24 * 60 * 60);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче