mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-12 10:40:12 +00:00
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:
parent
a1165ce494
commit
e8a6e8c590
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user