-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Comments
@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 |
Has then been fixed? |
Still seeing this issue in 0.89.1 |
This issue is closed for #2249 which is where any updates/questions should be made |
Still seeing this issue in 0.92.2 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 inha-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.The text was updated successfully, but these errors were encountered: