phplist

NOTE:: Before reporting an issue, make sure you are running the latest version, currently 3.3.1


View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015512phplist applicationClick Trackingpublic04-07-10 14:2126-03-13 16:14
Reporterh2b2 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version2.10.10 
Target Version4.0.xFixed in Version2.11.8 
Summary0015512: Converting statistical responsetime from seconds to h:m:s
DescriptionFeature request by gcd:
===== Start quote =====
We find the click stats useful, but the responsetime displayed by /admin/mviews.php is in seconds, and therefore difficult for a human to process. We've convert it to hours:minutes:seconds by changing line 136 (in v2.10.10) to use gmdate():

From:
$ls->addColumn($element,$GLOBALS['I18N']->get('responsetime'),$row['responsetime'].' '.$GLOBALS['I18N']->get('sec'));

to:
$ls->addColumn($element,$GLOBALS['I18N']->get('responsetime'),gmdate("H:i:s", $row['responsetime']));

Might want to consider that for future versions.
Thanks for the great tool! :D
===== End quote =====
ref: http://forums.phplist.com/viewtopic.php?f=4&t=27762#p66665 [^]
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0051052)
h2b2 (manager)
04-07-10 17:14

On a similar note dlynes suggests this mod:

===== Start quote =====

I've modified the code to show response time in days, hours, minutes and seconds instead of just seconds.

It may or may not be good for languages other than English or French, as I'm not using the I18N globals array for the separators, but I hope you still find the code useful:

Replace line 136 in mviews.php:
$ls->addColumn($element,$GLOBALS['I18N']->get('responsetime'),$row['responsetime'].' '.$GLOBALS['I18N']->get('sec'));

With:
$rtdays=(int)($row['responsetime']/3600/24) ;
$rthours=(int)(($row['responsetime']-$rtdays*3600*24)/3600) ;
$rtminutes=(int)(($row['responsetime']-$rtdays*3600*24-$rthours*3600)/60) ;
$rtseconds=($row['responsetime']-$rtdays*3600*24-$rthours*3600-$rtminutes*60) ;
$ls->addColumn($element,$GLOBALS['I18N']->get('responsetime'),$rtdays . 'd:' . $rthours . 'h:' . $rtminutes . 'm:' . $rtseconds . 's');


===== End quote =====
ref: http://forums.phplist.com/viewtopic.php?f=16&t=28152&p=74032#p67829 [^]
(0051096)
gazouteast (reporter)
27-09-10 10:30

.

+1 requesting this switch to human-understandable periods, rather than just number of seconds

.


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker