-
-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
input_datetime is an hour out on UK time #10784
Comments
@tinloaf - as discussed on the forums. |
What exactly is the setting of your
? |
👍 |
Same issue, also I'm running inside a docker-container with a This appears to be a cosmetic issue only. For example, If I have an input_datetime set to 8:00 am in my config, the card will show 9:00. Clicking on the card will show 9:00 in the top-right corner but 8:00 in the text inputs. The input_datetime's state will be |
Had the chance to do some more investigation, looks like it's a chrome bug:- In chrome dev console:
Also confirmed that the bug does not occur in firefox Could be fixed by tweaking the default year/month/day in |
HAH! it also works fine before 1968. According to https://en.wikipedia.org/wiki/British_Summer_Time we were GMT+1 all year between 1968 and 1971. I hate coding around daylight saving :( Created chrome issue here: https://bugs.chromium.org/p/chromium/issues/detail?id=797548 |
(I have no doubt that you know what you are doing, this question is curiosity and not doubting your findings in any way) Why does Chrome touch the time? Surely the whole point in a Web page is that I say "print 1900 on the screen in green coloured times new roman font" and that's what it does? |
So, what home-assistant tells chrome to do is "print 19:00 in whatever the local style for displaying times is". 19:00 is an solid example, because that's displayed as 7:00 PM, but PM is an english abbreviation and has different equivalents elsewhere. See https://en.wikipedia.org/wiki/Date_and_time_representation_by_country if you want more info. |
OK, so, (sorry to sound daft, as you can see I have no idea how this works) but... Could we not take that option out of the browser's hands and just tell it to print 19:00? (like, send it a string instead) My thinking being (bare with me): I set up an input_datetime in my configuration. I set the time to 1900 My frontend displays 2000 for the reason you've outlined. BUT, in my devices list the state of the input_datetime is 1900, presumably because it's passed to the browser as a string rather than a 'time'? Given that the frontend display is purely aesthetic, and given that I don't expect anybody will ever want it to show any time other than the one they've set could we not pass it as a string in the front end too? |
That's potentially detrimental to some countries, depending on how they conventionally display times. To know whether it's safe, you've gotta start digging from that link I posted. There's a simpler workaround HA can implement, which is to use the current year/month/day for the date they're required to include to get the browser to render a time, instead of 1970-01-01. Evidently history is scattered with awkward little fiddly daylight saving rules for people to trip over. That particular selection has highlighted two, so it's not unreasonable to assume that any arbitrary selection will do the same. Today is less likely to be buggy :) I'll see if I can't whip up a quick pr for that now actually, sure that's what you're actually after :) |
Fair enough, just thinking out loud whilst simultaneously trying to learn something. Everyday is a school day, and as I type this the clock has just changed to midnight going in to Xmas day, so, ummm, Merry Christmas 😀😀 PS - a PR to fix would be an ace stocking filler 😂😂 |
Merry Xmas :) |
Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (
hass --version
):*0.58.1
Python release (
python3 --version
):3.6.0
Component/platform:
input_datetime
Description of problem:
In the UK we are currently on GMT. We were on BST until the end of last month (one hour ahead).
Attempting to set the datetime to 19:00 sets it to 20:00.
Component seems to be correcting for an hour forward, as it is taking the time and unnecessarily converting it to BST.
Expected:
Component just accepts that I know what time want to set it to and doesn't convert it to BST, especially as I'm not in BST, and if I was I would still mean 19:00 if that's what I set.
Problem-relevant
configuration.yaml
entries and steps to reproduce:Additional info:
(the above sarcasm is sense of humour, not annoyance 😃 )
The text was updated successfully, but these errors were encountered: