Wrong date range in the Summary View
-
Hi,
I think the problem might be caused by something outside of this (btw great) plugin, anyway – help will be highly appreciated.
I have two WP sites on the same server, same WP version (4.3.1).
I have installed WP SlimStats (4.2.2) on both, and on one there is everything fine, and on the second the Summary View gives a wrong date range for the Pageviews graph.I was searching the forum and I have found how to debug this issue, so I have added the following lines to admin/views/wp-slimstat-db.php, after line 519 ($filters_normalized[ ‘utime’ ][ ‘type’ ] = ‘m’;):
echo “debug”;
$test = mktime(0, 0, 0, 12, 1, 2015);
echo ” month2 “; echo date_i18n( ‘n’ ); echo “, “;
echo ” start “; echo $filters_normalized[ ‘utime’ ][ ‘start’ ]; echo “, “;
echo ” end “; echo $filters_normalized[ ‘utime’ ][ ‘end’ ]; echo “, “;
echo ” date_test “; echo date(“Y-M-d”, mktime(0, 0, 0, 12, 1, 2015)); echo “, “;
echo ” date_test2 “; echo date(“Y-M-d”, $test); echo “, “;
echo $test; echo “, “;What it produces on the report screen (tested on 8-12-2015) is making me crazy:
“debug month2 12, start 1448924400, end 1451606399, date_test 2015-Dec-01, date_test2 2015-Dec-01, 1448924400”
– The epoch date for start date is wrong (1448924400 instead of 1448928000), though somehow it is converted into a right date string (2015-Dec-01), but anyway, the time range for the summary report is set wrong: 30-11-15 – 08-12-15
Kind regards.
- The topic ‘Wrong date range in the Summary View’ is closed to new replies.