custom-components / sensor.stadtreinigung_hamburg

Stadtreinigung Hamburg - get garbage collection dates in Hamburg - custom component for Home Assistant
MIT License
27 stars 6 forks source link

Date shows "Invalid Date" on iOS, but it's properly displayed in Chrome/DD (desktop) #4

Closed monkeydriven closed 4 years ago

monkeydriven commented 4 years ago

Moin! ;)

If I use the sensors that are created through the integration they work fine in Chrome and Firefox (desktop browser).

Unbenannt

But in Safari (iOS) it is calculated as an invalid date.

grafik

According to https://github.com/home-assistant/frontend/issues/4110 this has to do with the timestamp format.

" Chrome on Mac and Windows is perfectly happy with the format YYYY-MM-DD HH:MM:SSTZD (as with the value "2019-10-23 09:51:00+03:00") but Safari and Chrome on iOS requires it to be in the format YYYY-MM-DDTHH:MM:SSTZD (e.g. "2019-10-23T09:51:00+03:00") "

Can you adapt to this ?

vigonotion commented 4 years ago

Sure, can you please test this branch: vi/isotimestamp I don't have an iOS device to test with, but it still works in Chrome/Firefox and shows the "T" in the timestamp

monkeydriven commented 4 years ago

That was fast :) It now works perfectly on iOS as well!