WTH: Why is HA still showing AM/PM instead of 24H?

Then your language setting probably is set to English instead of English (GB)?

Yep, correct.

Changing to English GB fixes some places (logbook and history tab), but I still see it at the sensor popup graphs:

That’s strange. I also have mine set to English (GB) and the more-info graphs show correctly as 24 hour for me:

Edit: In fact, even when I have it as “English” I still get it 24 hour in the popups (but 12 hour elsewhere) so I don’t know where that’s coming from.

4 Likes

I can confirm that switching to English (GB) the time will be displayed as 24H in the logbook, history, sensor graphs, sensor history.
No need to vote anymore :slight_smile: Thanks @Bram_Kragten

1 Like

Yes, they use your browser language settings instead if the Home Assistant settings.

Actually, I just found that on my Mac it seems to pick it up from the OS language settings. The language settings in Chrome didn’t have any effect, but if I changed the Mac preferred language to English (US) (in System Preferences > Language & Region) and restart Chrome it changes the time tin the popups to 12 hour.

So, at least for me, logbook and history are using the profile language and more-info popups are using the OS language.

Correct, that is corrected in the PR linked 3 posts above ^

1 Like

Glad it worked out for you, though for me it is still very inconsistent. We do need a configuration for this in case it doesn’t display correctly :slight_smile: The more votes for this the better

With the PR above, why would you still need this setting?

What if I want English and not English GB + 24H clock? I think people should be given the option what clock they want.

2 Likes

The only difference between English and English GB is the date/time format?

But how is that obvious to the end user?
I believe a setting will be obvious.

I mean if someone wants their native language and still want 12 hour then that should be possible.
Don’t restrict it to the language!

My phone has the same thing.
If I choose English language I MUST have the 12 hour format.
That has forced me to use poor translated versions of apps.

2 Likes

What I believe is to have a “template tool” in general configuration.
Essentially a text box with any format as default.

Example:

YYYY-MM-DD HH:II:SS

And an area where it shows what that is translated too:

2020-08-22 11:55:28

That way the user can create whatever datetime format they want.

2 Likes

Then what if I want Dutch and a 12H clock? :wink:

I don’t see why restricting the user’s choice is a good thing here.

Same goes for first day of the week, for some reason it is a Sunday in the logbook date picker:

AFAIK in GB, the first day of the week is a Monday :slight_smile: and also for pretty much all of Europe.

1 Like

All those things should be configured separatelly. It’s out of any discussion. Please let’s not invent the wheel againg. Such thich are aroud us in operating systems, simulation systems (and games) etc.

At first it should be defaulted to location the system is installed.
But after that all those settings (language, time format, decimal point etc should be freely configured

1 Like

Just my 2 cents (Euro or Dollar), but this is the same type of issue you see when going on holiday in Sweden and my browser starts defaulting to Swedish on sites, just based on my IP address. All well and good, but apart from Hej and Skol I don’t speak any Swedish!

If I want English GB as the language, a comma for the decimal delimiter, Sunday as the start of the week, and the date to be MM-DD-YYYY, I should be able to choose that and not rely on what someone else thinks I may want.

Don’t get me wrong, I am all for standards, but in this case personal choice should override that. I have the same problem with weather apps that only allow Metric or Imperial - I want distance in miles and temperature in Celsius.

IMO, the best option would be select the language (I actually think that should be titled Locale if it is setting options other than just the spoken/written language), and setup the defaults based on what is associated with that locale. But also have an option to open an advanced setting which allows fine tuning.

@Skye, you are correct, that is wrong, it should be a Monday for the GB locale.

3 Likes

Part of this can be done via locale. There are some components that use locale but not all. And then there could be some knobs in configuration or UI to change locale but usually locale comes from ENV.

Works fine for time, calendar and number formats. For temperature and all other units, these should be somehow added to HA and then tied with locale. Or most probably there are already packages that can be used for that.