[freeside-commits] freeside/httemplate/edit rate_time.cgi,1.2,1.3
Mark Wells
mark at wavetail.420.am
Thu Sep 23 18:04:09 PDT 2010
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail.420.am:/tmp/cvs-serv18138/httemplate/edit
Modified Files:
rate_time.cgi
Log Message:
fix display of 12:00 hour in time intervals
Index: rate_time.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/rate_time.cgi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- rate_time.cgi 22 Jul 2010 00:11:55 -0000 1.2
+++ rate_time.cgi 24 Sep 2010 01:04:07 -0000 1.3
@@ -39,7 +39,7 @@
4 => 'Thu',
5 => 'Fri',
6 => 'Sat', ];
-my $hour = [ map( {$_, sprintf('%02d',$_) } 0..11 )];
+my $hour = [ map( {$_, sprintf('%02d',$_) } 12, 1..11 )];
my $min = [ map( {$_, sprintf('%02d',$_) } 0,30 )];
my $ampm = [ 0 => 'AM', 1 => 'PM' ];
@@ -57,7 +57,7 @@
else {
foreach my $interval ($rate_time->intervals) {
push @data, [ map { int($_/86400) % 7,
- int($_/3600) % 12,
+ (int($_/3600) % 12 || 12),
int($_/60) % 60,
int($_/43200) % 2, }
( $interval->stime, $interval->etime )
More information about the freeside-commits
mailing list