Read DateTime object from MQTT String channel

How can I create a DateTime Item from a MQTT string channel?

I want to read a value from MQTT that is formatted in ISO 8601 format. However, it is read as string channel from the binding (mqtt-homie). Is there an elegant way (no “intermediate” items/rules) to read the string channel as DateTime item?

Configuration:

  • Thing is a auto-detected Homie (MQTT) device.
  • Channels are auto-detected (see below for details)
  • Item configuration:
    DateTime Pruefung0Nextcheck "Nächste Prüfung" (gPruefung) {channel="mqtt:homie300:mqautom:flnpodio:pruefung0#nextcheck"}
  • –> Datetime item stays empty. If I configure it as string, the string contains the string exactly as it is received from mqtt which is a valid ISO 8601 formatting (2017-12-27T00:00:00Z):
    openhab> smarthome:status Pruefung0Nextcheck                                                                                         
    2017-12-27T00:00:00Z
    

Thing configuration details:

openhab> smarthome:things show mqtt:homie300:mqautom:flnpodio
UID: mqtt:homie300:mqautom:flnpodio
Type: mqtt:homie300
Label: flnpodio
Status: ONLINE
Bridge: mqtt:broker:mqautom

Properties:
        homieversion : 4.0.0

Configuration parameters:
        removetopics : false
        deviceid : flnpodio
        basetopic : homie

Channels:
[....]
        ID: pruefung0#nextcheck
        Label: Nächste Prüfung
        Type: mqtt:homie_2Fflnpodio_2Fpruefung0_2Fnextcheck

[....]

Example MQTT messages:

homie/flnpodio/pruefung0/checkobject Kompressor D - Druckbehälter - Außen
homie/flnpodio/pruefung0/nextcheck 2017-12-27T00:00:00Z