Issues with DateTimeType Cast

From the above message it is unclear if 2025-02-04 09:22:39.741+0000 is a String, StringType, DateTimeType, Instant, ZonedDateTime object.

script.model.ScriptInterpreter: emit what cannot be casted to what after a single evaluation of the cast by dilyanpalauzov · Pull Request #5329 · openhab/openhab-core · GitHub changes the error message on failed casts in DSL Rules/Scripts/Transforms to spell not only the value, which cannot be casted (as it is now), but also its class.

Besides, instead of Functions$Function1 <String, String> you can write (String)=>String, cf. https://eclipse.dev/Xtext/xtend/documentation/203_xtend_expressions.html#closure-types.