зеркало из https://github.com/mozilla/pjs.git
removing jrgm's version of &days=, Date::Calc version is working.
This commit is contained in:
Родитель
2db1fd1f6b
Коммит
1c0429a7de
|
@ -1,10 +1,8 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
use CGI::Carp qw(fatalsToBrowser);
|
use CGI::Carp qw(fatalsToBrowser);
|
||||||
use CGI::Request;
|
use CGI::Request;
|
||||||
#use POSIX qw(strftime);
|
|
||||||
use Date::Calc qw(Add_Delta_Days); # http://www.engelschall.com/u/sb/download/Date-Calc/
|
use Date::Calc qw(Add_Delta_Days); # http://www.engelschall.com/u/sb/download/Date-Calc/
|
||||||
|
|
||||||
|
|
||||||
my $req = new CGI::Request;
|
my $req = new CGI::Request;
|
||||||
|
|
||||||
my $TBOX = lc($req->param('tbox'));
|
my $TBOX = lc($req->param('tbox'));
|
||||||
|
@ -94,17 +92,6 @@ sub show_graph {
|
||||||
$yscale = "set yrange [ 1300 : 1400 ]";
|
$yscale = "set yrange [ 1300 : 1400 ]";
|
||||||
}
|
}
|
||||||
|
|
||||||
# Trying Date::Calc module, jrgm & I started two implementations
|
|
||||||
# at the same time... -mcafee
|
|
||||||
#
|
|
||||||
# use constant DAY => 60*60*24;
|
|
||||||
# my $rightNow = time();
|
|
||||||
# my $endOfDay = $rightNow + 2 * DAY - $rightNow % DAY;
|
|
||||||
# my $upperDay = strftime "%Y/%m/%d/%H/%M/%S", gmtime($endOfDay);
|
|
||||||
# my $lowerDay = strftime "%Y/%m/%d/%H/%M/%S", gmtime($endOfDay - 7*DAY);
|
|
||||||
# #set xrange [ $lowerDay : $upperDay ]
|
|
||||||
# set timefmt "%Y/%m/%d/%H/%M/%S"
|
|
||||||
# set xrange [ $lowerDay : $upperDay ]
|
|
||||||
# interpolate params into gnuplot command
|
# interpolate params into gnuplot command
|
||||||
my $cmds = qq{
|
my $cmds = qq{
|
||||||
reset
|
reset
|
||||||
|
|
Загрузка…
Ссылка в новой задаче