| @@ -55,13 +55,21 @@ | ||
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | if ( false === $charitable_start_date || false === $charitable_end_date || false === $charitable_campaign_id ) { |
| 58 | 58 | // If still nothing assign defaults. |
| 59 | + /* | |
| 60 | + * Site-local, not UTC: this feeds Charitable_Reports::get_data(), which | |
| 61 | + * filters on p.post_date (site-local time), so a bound built from bare | |
| 62 | + * UTC excludes part of today's activity on any site whose timezone is | |
| 63 | + * ahead of UTC. | |
| 64 | + * | |
| 65 | + * @since 1.8.13 | |
| 66 | + */ | |
| 59 | 67 | $charitable_report_overview_defaults = apply_filters( |
| 60 | 68 | 'charitable_report_activity_defaults', |
| 61 | 69 | array( |
| 62 | - 'start_date' => gmdate( 'Y/m/d', strtotime( '-7 days' ) ), | |
| 63 | - 'end_date' => gmdate( 'Y/m/d' ), | |
| 70 | + 'start_date' => gmdate( 'Y/m/d', current_time( 'timestamp', 0 ) - ( 7 * DAY_IN_SECONDS ) ), | |
| 71 | + 'end_date' => gmdate( 'Y/m/d', current_time( 'timestamp', 0 ) ), | |
| 64 | 72 | 'campaign_id' => -1, |
| 65 | 73 | 'activity_type' => '', |
| 66 | 74 | 'limit' => false, |
| 67 | 75 | ) |