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

[FR] Changeable Timestamp format #9

Closed
fanningert opened this issue Dec 19, 2020 · 11 comments
Closed

[FR] Changeable Timestamp format #9

fanningert opened this issue Dec 19, 2020 · 11 comments

Comments

@fanningert
Copy link

Is your feature request related to a problem? Please describe.
Currently the date time format of the media browser is displaying the values not in 24h Format or DD.MM.YYYY.

Describe the solution you'd like
Use the timestamp format of Home assistant.

Describe alternatives you've considered
No alternative solution, I think.

Additional context
image

@blakeblackshear
Copy link
Owner

Are you setting the timestamp format in homeassistant somewhere?

@fanningert
Copy link
Author

No, i think it's a part of the localisation.

@blakeblackshear
Copy link
Owner

Can you give me an example of where you see the date formatted correctly in homeassistant? I thought I was already using the function for a localized date string.

@mario-tux
Copy link

In multimedia browser I can still see the date formatted in as MM/DD/YY with AM/PM: my HA is configured with the Italian localization (so DD/MM/YY and 24h).

image

@blakeblackshear
Copy link
Owner

Where do you configure that in homeassistant?

@mario-tux
Copy link

mario-tux commented Dec 22, 2020

Where do you configure that in homeassistant?

I think the frontend language belongs to the user settings: click on your username on the bottom-left corner. I didn't (I think, I can't) change the date format: just selected my language.

@fanningert fanningert mentioned this issue Dec 29, 2020
@artlov
Copy link

artlov commented Jan 24, 2021

I am also interested in being able to have the 24h time format. I use English (GB) localisation in HA and the time format within HA is correct. For example, in the "History" view (start and end date picker).

@TheQue42
Copy link

I'd live to have this as well and now there really is a specific place for time format settings:

https://www.home-assistant.io/blog/2021/06/02/release-20216/#time-format-settings

@dermotduffy
Copy link
Collaborator

I've recently started contributing to this integration -- and this bug is something I am absolutely going to work on. I'm currently working on unittests for the whole thing, and literally right now for media_source.py where the offending code lives. Once there's full unittest coverage, this bug is the very next thing, as am/pm upsets me more than it should ;-)

@dermotduffy
Copy link
Collaborator

I think we should close this bug for now.

The now merged PR changes to ISO 8601 dates and time formats to 24h which is about as reasonable a default as you can get on something subjective like this, and will feature in the next release. There is possible avenues (at a cost of additional complexity) to add a config flow option to support a custom time/date format, but given the new default I'm not sure that's actually worth it.

@dermotduffy
Copy link
Collaborator

As per comment above, closing this for now. If, even with the new time/date defaults, someone wants to make a case for the "additional complexity" avenues, we can re-open/re-discuss. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants