From 82dc606a8021c3f620f8190d2e70bdedddaa5449 Mon Sep 17 00:00:00 2001 From: ozhozh Date: Sat, 6 Nov 2010 21:56:53 +0000 Subject: [PATCH] 24 hours graph inconsistencies. Fixes issue 408. git-svn-id: http://yourls.googlecode.com/svn/trunk@527 12232710-3e20-11de-b438-597f59cd7555 --- yourls-infos.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yourls-infos.php b/yourls-infos.php index bd4eabd..a10c7da 100644 --- a/yourls-infos.php +++ b/yourls-infos.php @@ -103,7 +103,7 @@ // Build array of last 24 hours $last_24h[$hour] = number of click $then = strtotime( $click_time); if( ( $now >= $then ) && ( ( $now - $then ) < ( 24 * 60 * 60 ) ) ) { - $year = sprintf( "%02d", substr( $year, -1, 2 ) ); // 2009 -> 09 + $year = sprintf( "%02d", substr($year, -2) ); // 2009 -> 09 $diff = $now - strtotime( $click_time); if( !array_key_exists( "$year-$month-$day-$hour", $last_24h ) ) $last_24h["$year-$month-$day-$hour"] = 0; -- 2.45.0