- Issue created by @chrisolof
- πΊπΈUnited States chrisolof
After diving into the code a bit more I've realized, rather than broadening out to accepting just ISO 8601 and MYSQL DATETIME formats, it probably makes more sense to accept anything PHP's strtotime() function can consume. The downstream code just throws this value against strtotime(), which accepts many formats, including both MYSQL DATETIME and ISO 8601. As such, limiting entry to just MYSQL DATETIME and/or ISO 8601 seems unwarranted and adds what feels like unnecessary complexity to the validation method.
The approach I'm taking with the MR currently is to drop the "ISO date" stuff and instead ask for a date or date-time string in a format compatible with PHP's strtotime() function, keeping the current MYSQL DATETIME YYYY-MM-DD or YYYY-MM-DD HH:MM:SS as the suggested format. This seems to fix the bug in the least disruptive way, bringing in actual ISO 8601 date format support, keeping MYSQL DATETIME support, slightly reducing validation complexity, and adding support for many other date formats.
I'll post the MR for review after I've confirmed tests pass locally.
- Merge request !425Update 'Send email on' field in scheduled email handler to accept any format strtotime() can consume β (Merged) created by chrisolof
- Open on Drupal.org βCore: 10.1.4 + Environment: PHP 8.2 & MySQL 8last update
10 months ago Waiting for branch to pass - Status changed to Needs review
10 months ago 12:11am 30 March 2024 - πΊπΈUnited States chrisolof
MR 425 opened. Status changed to needs-review. Proposed resolution and UI changes sections updated to match the resolution proposed in MR 425. Immutable diff (patch) attached here capturing the current state of this MR.
- last update
10 months ago 536 pass - πΊπΈUnited States chrisolof
Merged latest 6.2.x changes into MR branch. Removed unused use statement. Added note about the default timezone that will be used to interpret the custom send-on date if not provided in the date string (so a source-code-dive isn't necessary to figure that out). Current state of the MR is attached, along with a screenshot of the changed field.
- First commit to issue fork.
- last update
10 months ago 536 pass - Status changed to Fixed
10 months ago 10:27pm 8 April 2024 -
jrockowitz β
committed 5a1ea45f on 6.2.x authored by
chrisolof β
Issue #3436867: Scheduled email handler ISO date/time field doesn't...
-
jrockowitz β
committed 5a1ea45f on 6.2.x authored by
chrisolof β
Automatically closed - issue fixed for 2 weeks with no activity.