Timezone and offset storage

Hi guys,
I need to store the time offset because my business logic needed it. My clients located in different offsets and I need to retrive the original offset in order to apply the business logic.

I tried to use a custom class, for example:

{
   "variables": {
      "customDate": {
         "value": "{ \"date\":\"2017-12-15T16:13+06:00\", \"timeZone\": \"+06:00\" }",
         "type": "Object",
         "valueInfo": {
            "serializationDataFormat": "application/json",
            "objectTypeName": "com.mypackage.CustomDate"
         }
      }
   }
}

Camunda stores my custom object successfully but I can’t use query filter on object types. Right?

Is there a best solution for this scenario?

Thanks a lot
Luca

Hi Luca,

which version of the engine are you using? starting from version 7.8 REST API supports TimeZones for all requests\responses. Would it be an option for you to upgrade?

Cheers,
Askar

I’m using 7.8 but my problem is not the timezone. I need to store the original offset.

For example, if I receive 2017-12-15T16:13+06:00

I need to retrive 06:00 in another step

Thanks
Luca

Hi @lsantaniello,

it’s hard to give some advice, as it depends on your use case details.
Why can’t you just pass additional variable “timezone” as a String? Do you need to supplement each date with the timezone? Can it differ within one process (several clients with different timezones are using one process)?

Regarding your other question: no, you can’t use query filter on object types for now. But you can play with the names. E.g. select variables with variableNameLike = %Date.

1 Like