bx-compat-cfml datediff fails to convert string

Description

The following code works of cf2021/3 and lucee 6

bx-compat-cfml throws and error - the dump above on bx-compat-cfml looks like boxlang is storing it as a “local time” object but then can't convert it to a string?

Activity

Show:

Brad WoodOctober 23, 2024 at 6:12 PM

Adding fix version

Jon ClausenOctober 21, 2024 at 2:28 PM

This is resolved in the next release.

Jon ClausenOctober 21, 2024 at 1:55 PM

So the root cause of this error is the way we are handling the QueryColumnType. The above code will fail if the query is created with
querynew("passwordhistory_id,created","integer,time");
or

querynew("passwordhistory_id,created","integer,timestamp");

But it succeeds if created with
querynew("passwordhistory_id,created","integer,date");

The code above is asking to do a day comparison between two times but, currently in BoxLang, when you specify time , it strips out the date information completely. Timestamp, at the very least, should work though.

I’m going to circle through the way we are handling query types. Lucee, for example, still stores time references as a DateTime object that can be parsed and make sure date/time objects in queries maintain full interop with BL DateTime values.

Jon ClausenOctober 21, 2024 at 1:32 PM

No, but I will try to resolve this one today

Luis MajanoOctober 21, 2024 at 11:50 AM

did you get a chance to see this?

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

Details

Assignee

Reporter

Fix versions

Priority

Sentry

Created October 11, 2024 at 10:39 PM
Updated October 23, 2024 at 6:12 PM
Resolved October 21, 2024 at 2:28 PM