parseDateTime failing

Description

When calling parseDateTime with a valid string "Sun Jul 19 2015 00:00:00 GMT+0100 (BST)" it fails - lucee / ACF return {ts '2015-07-19 00:00:00'} as expected

Stack Trace

Activity

Show:

Jon Clausen November 5, 2024 at 4:47 PM

Support added for this alt JS toString output

Jon Clausen November 5, 2024 at 4:34 PM
Edited

Actually, this is sort of a duplicate of . As noted in that story, the browser or JS engine can implement this however it chooses. It looks like, in this case, the parenthetical timezone is the abbreviation, rather than the long format. I’ll add some support for this format in the core, since it’s an alt format of the JS toString output.

Jon Clausen November 5, 2024 at 4:24 PM

We are really trying to get away, in BoxLang, from all of these non-standard date masks that Lucee and ACF used to support out of the box. The above date/time, for example, uses a medium form date with a short form time and a TZ abbreviation with an offset. There is no out of the box equivalent in the DateTimeFormatter class to handle this mixing of format styles.

ISO801 formats make all of this so much easier. ( e.g. 2015-06-19T00:00:00.000+01:00 )

I will add support in the compat module for this mask.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Fix versions

Priority

Sentry

Created November 5, 2024 at 3:18 PM
Updated November 5, 2024 at 4:47 PM
Resolved November 5, 2024 at 4:47 PM