UI showing a different last changed time than the sensor itself

This is a ping binary sensor for one of my hosts:

The ‘More Info’ UI is showing the correct connected time, when this host came online, i.e. 15:32:41 local time.

But the last_changed attribute for this sensor is showing a completely different time, i.e. 16:37:06 UTC, which would translate to 18:37:06 local time:

According to the documentation the last_changed attribute contains the timestamp of the last change of the sensor’s state. As the UI is showing the correct time, I’d expect the last_changed attribute of the sensor showing the same time (in UTC). But obviously its off by about 3 hours, 4 minutes and a couple of seconds.

How can this difference be explained and where does the UI get the correct value from?

Anyone? I’m really curious, why the UI seems to be able to retrieve the correct last triggered timestamp, but I am not… :thinking: