Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forecast dates/times in weather card incorrect in some browsers #2506

Closed
brlodi opened this issue Jan 20, 2019 · 6 comments
Closed

Forecast dates/times in weather card incorrect in some browsers #2506

brlodi opened this issue Jan 20, 2019 · 6 comments

Comments

@brlodi
Copy link

brlodi commented Jan 20, 2019

Home Assistant release with the issue:
0.85.1

Last working Home Assistant release (if known):
N/A

Browser and Operating System:
Inconsistency across browsers is the issue, but a minimal pair is Safari (or the iOS app which uses the same rendering backend) and Chrome/Chromium.

Description of problem:
As discussed in home-assistant/core#16548, on some browsers the forecast date/times in the weather card are displayed as doubly-offset from UTC, i.e. users in UTC-5 timezones see 5PM instead of 10PM while users in UTC-6 would see 4PM.

Javascript errors shown in the web inspector (if applicable):


Additional information:
Having determined that behavior varies between browsers, and having worked with JavaScript's implementation-depended date time handling, I suspected Date.parse() was being used somewhere. The culprit seems to be these one-off date formatting functions in ha-weather-card.js. Replacing them with proper calls to whatever home-assistant-polymer's standard date formatting functions are, which I believe pipe through the fecha library, will probably resolve the issue.

@iantrich
Copy link
Member

duplicate of #2249

@brlodi how do you feel about submitting a PR with a fix?

@brlodi
Copy link
Author

brlodi commented Mar 1, 2019

@iantrich sorry this got lost in the deluge of GitHub notifications from work. I can probably take a look at it this weekend and submit a PR

@WilkyF18
Copy link

Has then been fixed?

@KageKeeper
Copy link

Still seeing this issue in 0.89.1

@iantrich
Copy link
Member

This issue is closed for #2249 which is where any updates/questions should be made

@piersdd
Copy link

piersdd commented May 5, 2019

Still seeing this issue in 0.92.2

@github-actions github-actions bot locked and limited conversation to collaborators Jul 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants