| @@ -49,10 +49,17 @@ | ||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | if ( false === $charitable_start_date || false === $charitable_end_date || false === $charitable_filter ) { |
| 52 | 52 | // If still nothing assign defaults. |
| 53 | - $charitable_start_date = gmdate( 'Y/m/d', strtotime( '-7 days' ) ); | |
| 54 | - $charitable_end_date = gmdate( 'Y/m/d' ); | |
| 53 | + /* | |
| 54 | + * Site-local, not UTC: post_date is stored in site-local time, so a bound | |
| 55 | + * built from bare UTC excludes part of today's donations on any site whose | |
| 56 | + * timezone is ahead of UTC. | |
| 57 | + * | |
| 58 | + * @since 1.8.13 | |
| 59 | + */ | |
| 60 | + $charitable_start_date = gmdate( 'Y/m/d', current_time( 'timestamp', 0 ) - ( 7 * DAY_IN_SECONDS ) ); | |
| 61 | + $charitable_end_date = gmdate( 'Y/m/d', current_time( 'timestamp', 0 ) ); | |
| 55 | 62 | $charitable_filter = 7; |
| 56 | 63 | $charitable_campaign_id = -1; // cannot be zero because that would be false. |
| 57 | 64 | $charitable_category_id = 0; |
| 58 | 65 | } |