Removed timezone info that was added incorrectly

This commit is contained in:
Peter Fabian 2018-12-10 16:54:46 +01:00 committed by Joshua Flowers
parent a346f13beb
commit 6950522f91
2 changed files with 49 additions and 49 deletions

View File

@ -17,7 +17,7 @@ class WC_Admin_Reports_Interval {
* *
* @var string * @var string
*/ */
public static $iso_datetime_format = 'Y-m-d\TH:i:s\Z'; public static $iso_datetime_format = 'Y-m-d\TH:i:s';
/** /**
* Format string for use in SQL queries. * Format string for use in SQL queries.

View File

@ -594,12 +594,12 @@ class WC_Tests_Reports_Interval_Stats extends WC_Unit_Test_Case {
public function test_next_hour_start() { public function test_next_hour_start() {
$settings = array( $settings = array(
'2017-12-30T00:00:00Z' => array( '2017-12-30T00:00:00Z' => array(
0 => '2017-12-30T01:00:00Z', 0 => '2017-12-30T01:00:00',
1 => '2017-12-29T23:59:59Z', 1 => '2017-12-29T23:59:59',
), ),
'2017-12-30T10:00:00Z' => array( '2017-12-30T10:00:00Z' => array(
0 => '2017-12-30T11:00:00Z', 0 => '2017-12-30T11:00:00',
1 => '2017-12-30T09:59:59Z', 1 => '2017-12-30T09:59:59',
), ),
); );
foreach ( $settings as $datetime_s => $setting ) { foreach ( $settings as $datetime_s => $setting ) {
@ -617,12 +617,12 @@ class WC_Tests_Reports_Interval_Stats extends WC_Unit_Test_Case {
public function test_next_day_start() { public function test_next_day_start() {
$settings = array( $settings = array(
'2017-12-30T00:00:00Z' => array( '2017-12-30T00:00:00Z' => array(
0 => '2017-12-31T00:00:00Z', 0 => '2017-12-31T00:00:00',
1 => '2017-12-29T23:59:59Z', 1 => '2017-12-29T23:59:59',
), ),
'2017-12-30T10:00:00Z' => array( '2017-12-30T10:00:00Z' => array(
0 => '2017-12-31T00:00:00Z', 0 => '2017-12-31T00:00:00',
1 => '2017-12-29T23:59:59Z', 1 => '2017-12-29T23:59:59',
), ),
); );
foreach ( $settings as $datetime_s => $setting ) { foreach ( $settings as $datetime_s => $setting ) {
@ -641,36 +641,36 @@ class WC_Tests_Reports_Interval_Stats extends WC_Unit_Test_Case {
update_option( 'start_of_week', 1 ); update_option( 'start_of_week', 1 );
$settings = array( $settings = array(
'2017-12-30T00:00:00Z' => array( '2017-12-30T00:00:00Z' => array(
0 => '2018-01-01T00:00:00Z', 0 => '2018-01-01T00:00:00',
1 => '2017-12-24T23:59:59Z', 1 => '2017-12-24T23:59:59',
), ),
'2017-12-30T10:00:00Z' => array( '2017-12-30T10:00:00Z' => array(
0 => '2018-01-01T00:00:00Z', 0 => '2018-01-01T00:00:00',
1 => '2017-12-24T23:59:59Z', 1 => '2017-12-24T23:59:59',
), ),
'2010-12-25T10:00:00Z' => array( '2010-12-25T10:00:00Z' => array(
0 => '2010-12-27T00:00:00Z', 0 => '2010-12-27T00:00:00',
1 => '2010-12-19T23:59:59Z', 1 => '2010-12-19T23:59:59',
), ),
'2010-12-26T10:00:00Z' => array( '2010-12-26T10:00:00Z' => array(
0 => '2010-12-27T00:00:00Z', 0 => '2010-12-27T00:00:00',
1 => '2010-12-19T23:59:59Z', 1 => '2010-12-19T23:59:59',
), ),
'2010-12-27T00:00:00Z' => array( '2010-12-27T00:00:00Z' => array(
0 => '2011-01-03T00:00:00Z', 0 => '2011-01-03T00:00:00',
1 => '2010-12-26T23:59:59Z', 1 => '2010-12-26T23:59:59',
), ),
'2010-12-31T00:00:00Z' => array( '2010-12-31T00:00:00Z' => array(
0 => '2011-01-03T00:00:00Z', 0 => '2011-01-03T00:00:00',
1 => '2010-12-26T23:59:59Z', 1 => '2010-12-26T23:59:59',
), ),
'2011-01-01T00:00:00Z' => array( '2011-01-01T00:00:00Z' => array(
0 => '2011-01-03T00:00:00Z', 0 => '2011-01-03T00:00:00',
1 => '2010-12-26T23:59:59Z', 1 => '2010-12-26T23:59:59',
), ),
'2011-01-03T00:00:00Z' => array( '2011-01-03T00:00:00Z' => array(
0 => '2011-01-10T00:00:00Z', 0 => '2011-01-10T00:00:00',
1 => '2011-01-02T23:59:59Z', 1 => '2011-01-02T23:59:59',
), ),
); );
foreach ( $settings as $datetime_s => $setting ) { foreach ( $settings as $datetime_s => $setting ) {
@ -689,20 +689,20 @@ class WC_Tests_Reports_Interval_Stats extends WC_Unit_Test_Case {
update_option( 'start_of_week', 7 ); update_option( 'start_of_week', 7 );
$settings = array( $settings = array(
'2010-12-25T10:00:00Z' => array( '2010-12-25T10:00:00Z' => array(
0 => '2010-12-26T00:00:00Z', 0 => '2010-12-26T00:00:00',
1 => '2010-12-18T23:59:59Z', 1 => '2010-12-18T23:59:59',
), ),
'2010-12-26T10:00:00Z' => array( '2010-12-26T10:00:00Z' => array(
0 => '2011-01-01T00:00:00Z', 0 => '2011-01-01T00:00:00',
1 => '2010-12-25T23:59:59Z', 1 => '2010-12-25T23:59:59',
), ),
'2011-01-01T00:00:00Z' => array( '2011-01-01T00:00:00Z' => array(
0 => '2011-01-02T00:00:00Z', 0 => '2011-01-02T00:00:00',
1 => '2010-12-31T23:59:59Z', 1 => '2010-12-31T23:59:59',
), ),
'2011-01-02T00:00:00Z' => array( '2011-01-02T00:00:00Z' => array(
0 => '2011-01-09T00:00:00Z', 0 => '2011-01-09T00:00:00',
1 => '2011-01-01T23:59:59Z', 1 => '2011-01-01T23:59:59',
), ),
); );
foreach ( $settings as $datetime_s => $setting ) { foreach ( $settings as $datetime_s => $setting ) {
@ -720,13 +720,13 @@ class WC_Tests_Reports_Interval_Stats extends WC_Unit_Test_Case {
public function test_next_month_start() { public function test_next_month_start() {
$settings = array( $settings = array(
'2017-12-30T00:00:00Z' => array( '2017-12-30T00:00:00Z' => array(
0 => '2018-01-01T00:00:00Z', 0 => '2018-01-01T00:00:00',
1 => '2017-11-30T23:59:59Z', 1 => '2017-11-30T23:59:59',
), ),
// Leap year reversed test. // Leap year reversed test.
'2016-03-05T10:00:00Z' => array( '2016-03-05T10:00:00Z' => array(
0 => '2016-04-01T00:00:00Z', 0 => '2016-04-01T00:00:00',
1 => '2016-02-29T23:59:59Z', 1 => '2016-02-29T23:59:59',
), ),
); );
foreach ( $settings as $datetime_s => $setting ) { foreach ( $settings as $datetime_s => $setting ) {
@ -744,16 +744,16 @@ class WC_Tests_Reports_Interval_Stats extends WC_Unit_Test_Case {
public function test_next_quarter_start() { public function test_next_quarter_start() {
$settings = array( $settings = array(
'2017-12-31T00:00:00Z' => array( '2017-12-31T00:00:00Z' => array(
0 => '2018-01-01T00:00:00Z', 0 => '2018-01-01T00:00:00',
1 => '2017-09-30T23:59:59Z', 1 => '2017-09-30T23:59:59',
), ),
'2018-01-01T10:00:00Z' => array( '2018-01-01T10:00:00Z' => array(
0 => '2018-04-01T00:00:00Z', 0 => '2018-04-01T00:00:00',
1 => '2017-12-31T23:59:59Z', 1 => '2017-12-31T23:59:59',
), ),
'2018-02-14T10:00:00Z' => array( '2018-02-14T10:00:00Z' => array(
0 => '2018-04-01T00:00:00Z', 0 => '2018-04-01T00:00:00',
1 => '2017-12-31T23:59:59Z', 1 => '2017-12-31T23:59:59',
), ),
); );
foreach ( $settings as $datetime_s => $setting ) { foreach ( $settings as $datetime_s => $setting ) {
@ -771,16 +771,16 @@ class WC_Tests_Reports_Interval_Stats extends WC_Unit_Test_Case {
public function test_next_year_start() { public function test_next_year_start() {
$settings = array( $settings = array(
'2017-12-31T23:59:59Z' => array( '2017-12-31T23:59:59Z' => array(
0 => '2018-01-01T00:00:00Z', 0 => '2018-01-01T00:00:00',
1 => '2016-12-31T23:59:59Z', 1 => '2016-12-31T23:59:59',
), ),
'2017-01-01T00:00:00Z' => array( '2017-01-01T00:00:00Z' => array(
0 => '2018-01-01T00:00:00Z', 0 => '2018-01-01T00:00:00',
1 => '2016-12-31T23:59:59Z', 1 => '2016-12-31T23:59:59',
), ),
'2017-04-23T14:53:00Z' => array( '2017-04-23T14:53:00Z' => array(
0 => '2018-01-01T00:00:00Z', 0 => '2018-01-01T00:00:00',
1 => '2016-12-31T23:59:59Z', 1 => '2016-12-31T23:59:59',
), ),
); );
foreach ( $settings as $datetime_s => $setting ) { foreach ( $settings as $datetime_s => $setting ) {