| @@ -1791,9 +1791,10 @@ | ||
| 1791 | 1791 | |
| 1792 | 1792 | return array( |
| 1793 | 1793 | 'amount' => (float) $data['amount'], |
| 1794 | 1794 | 'order_id' => (string) $data['bp_order_id'], |
| 1795 | - 'payment_date' => current_time( 'mysql' ), | |
| 1795 | + // UTC, like every other writer of this table (see Classes\PaymentDateMigration). | |
| 1796 | + 'payment_date' => gmdate( 'Y-m-d H:i:s' ), | |
| 1796 | 1797 | 'source' => 'stripe', |
| 1797 | 1798 | 'transaction_id' => ! empty( $intent->id ) ? sanitize_text_field( $intent->id ) : '', |
| 1798 | 1799 | 'customer_info' => maybe_serialize( $intent ), |
| 1799 | 1800 | 'form_fields_info' => maybe_serialize( $form_fields_info ), |
| @@ -3341,11 +3342,13 @@ | ||
| 3341 | 3342 | * meta. Safe to call whether or not WooCommerce is active — returns null |
| 3342 | 3343 | * when WooCommerce (or the order) is unavailable, and the caller keeps |
| 3343 | 3344 | * its un-hydrated base row. |
| 3344 | 3345 | * |
| 3345 | - * Dates are returned as site-local `Y-m-d H:i:s` strings — the same shape | |
| 3346 | - * as the transactions table's `payment_date` — so the React admin formats | |
| 3347 | - * them with the one date helper it already has. | |
| 3346 | + * Dates are returned as site-local `Y-m-d H:i:s` strings (the subscription | |
| 3347 | + * filter compares `start_date` in site time), and the React admin renders | |
| 3348 | + * them as wall-clock times with `formatDateCompact()`. Note the transactions | |
| 3349 | + * table's `payment_date` is different: it is stored in UTC and rendered with | |
| 3350 | + * `formatDateTime()`, which converts it to the site timezone. | |
| 3348 | 3351 | * |
| 3349 | 3352 | * @param int $subscription_id Parent (subscription) order id. |
| 3350 | 3353 | * @return array|null |
| 3351 | 3354 | * @since 2.4.0 |