Failed to parse state "2022-10-31T11:13:59.061953+0000" for item iPhone_Lek_LocationLastUpdate: Text '2022-10-31T11:13:59.061953+0000' could not be parsed at index 23

I get a timestamp from MQTT. The mqtt channel is definied as DateTime

On every update I see this error in the openhab.log. But it seems to be a valid timestamp to me:

Failed to parse state "2022-10-31T11:13:59.061953+0000" for item iPhone_Lek_LocationLastUpdate: Text '2022-10-31T11:13:59.061953+0000' could not be parsed at index 23

What did I miss?

The MQTT binding probably does not parse correctly the dates. Please provide the beginning of the log entry to know in what binding and what class it fails.

This is something I fixed myself in another binding to accept from 1 to 9 digits for precision after the seconds.

Sorry, I thought I copied the whole log entry before…

2022-10-31 18:43:58.175 [WARN ] [l.handler.RemoteopenhabBridgeHandler] - Failed to parse state "2022-10-31T11:43:58.342361+0000" for item iPhone_LekWatch_LocationLastUpdate: Text '2022-10-31T11:43:58.342361+0000' could not be parsed at index 23

Interestingly the item.state is updated correctly on both sides (OH3 and OH2)

Ok, this is exactly what I fixed, that is in the remote openHAB binding.
What version of OH are you running ?
Fix was merged September the 6th. So it should be included only in last OH3.4 milestone.

1 Like

I am on:

runtimeInfo:
  version: 3.4.0.M1
  buildString: Milestone Build

Just updating now…

To be precise, the fix is there since OH 3.4 Milestone 2.

1 Like

Thanks @Lolodomo! I am updating right now and will come back with the result asap

Indeed, upgrading to OH 3.4 Milestone 3 fixed it - thanks a lot @Lolodomo