FEEL now() has timezone but Camunda 7 only support without timezone

now_is_not_date_and_time.dmn (1.8 KB)

I have four FEEL expression in DMN file.

  • now()
  • date and time( "2012-12-24T23:59:00" ) - date and time( "2012-12-22T03:45:00" )
  • now() - date and time ( "2012-12-24T23:59:00" )
  • now() - now()

I think all of them can have a result. But the third one return Null. Other three is correct.

The following result is generate by API /decision-definition/key/Decision_1rkxynt/evaluate (Camunda 7.20.0)

[
  {
    "a": {
      "type": "String",
      "value": "2024-04-23T11:01:22.618119500+08:00[Asia/Shanghai]",
      "valueInfo": {}
    },
    "b": {
      "type": "String",
      "value": "PT68H14M",
      "valueInfo": {}
    },
    "c": {
      "type": "Null",
      "value": null,
      "valueInfo": {}
    },
    "d": {
      "type": "String",
      "value": "PT0S",
      "valueInfo": {}
    }
  }
]

I know the reason.
now() return type ValDateTime, but date and time ( "2012-12-24T23:59:00" ) return ValLocalDateTime.

There may be a bug in Camunda 7 , it can only receive time without timezone.
( docs: dmn-engine/data-types/#working-with-dates )
Even if I use 2012-12-24T23:59:00+08:00, it doesn’t return time with zone.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.