1 |
diff -Nur -x '*.orig' -x '*.rej' smeserver-arkeia-1.0/root/etc/e-smith/events/actions/rotate-tape mezzanine_patched_smeserver-arkeia-1.0/root/etc/e-smith/events/actions/rotate-tape |
2 |
--- smeserver-arkeia-1.0/root/etc/e-smith/events/actions/rotate-tape 2007-07-12 14:51:29.000000000 -0600 |
3 |
+++ mezzanine_patched_smeserver-arkeia-1.0/root/etc/e-smith/events/actions/rotate-tape 2007-07-12 14:51:18.000000000 -0600 |
4 |
@@ -5,6 +5,7 @@ |
5 |
use strict; |
6 |
use esmith::ConfigDB; |
7 |
use POSIX qw(floor); |
8 |
+use Time::Local qw(timegm); |
9 |
|
10 |
sub max ($$) { $_[$_[0] < $_[1]] }; |
11 |
|
12 |
@@ -26,7 +27,7 @@ |
13 |
my $quarterly = $arkeia->prop("Quarterly") || 0; |
14 |
my $yearly = $arkeia->prop("Yearly") || 0; |
15 |
|
16 |
-my $base = int(time()/86400); |
17 |
+my $base = int(timegm(localtime)/86400); |
18 |
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime($base*86400); |
19 |
my $y = $yearly ? max(($year-69) - ($yday <= $wday ? 1 : 0), 0) : 0; |
20 |
my $q = $quarterly ? max(($year-70)*4 + int($mon/3) - ($mon % 3 == 0 && $mday <= $wday ? 1 : 0) + 1 - $y, 0) : 0; |