/[smecontribs]/rpms/smeserver-arkeia/contribs7/smeserver-arkeia-1.0-rotate.patch2
ViewVC logotype

Contents of /rpms/smeserver-arkeia/contribs7/smeserver-arkeia-1.0-rotate.patch2

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download)
Tue Nov 25 16:20:18 2008 UTC (16 years ago) by slords
Branch: MAIN
CVS Tags: smeserver-arkeia-1_0-22_el4_sme, smeserver-arkeia-1_0-21_el4_sme, smeserver-arkeia-1_0-26_el4_sme, smeserver-arkeia-1_0-29_el4_sme, smeserver-arkeia-1_0-20_el4_sme, smeserver-arkeia-1_0-18_el4_sme, smeserver-arkeia-1_0-27_el4_sme, smeserver-arkeia-1_0-19_el4_sme, HEAD
Changes since 1.2: +0 -0 lines
Error occurred while calculating annotation data.
Restore

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;

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed