AdguardTeam / AdGuardHome

Network-wide ads & trackers blocking DNS server
https://adguard.com/adguard-home.html
GNU General Public License v3.0
24.44k stars 1.77k forks source link

Allow Users to Choose Date/Time Format #1498

Open Ultrabenosaurus opened 4 years ago

Ultrabenosaurus commented 4 years ago

Prerequisites

Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

Problem Description

AdGuard Home shows dates as 3/21/2020 but I live in the UK so this format doesn't make sense to me, and I have to look twice at a lot of dates - there is no 21st month! Most people in the UK would expect 21/03/2020 - note the leading zero on single-digit values. However, I personally prefer a format like 2020-03-21. There may also be people who prefer something like 21 Mar, 2020.

Similarly for time, I would like to see seconds on all times in the AdGuard Home UI but I can see why others don't care about seconds. However, right now in the Query Log, AGH show seconds for items on the current day but not for items on previous days. Being able to choose this would be nice.

Query Log seconds

Proposed Solution

Add an option in General Settings where users can choose the date format they prefer. Possibly also have a "Custom" option where users can specify the exact format they want, e.g. yyyy-mm-dd hh:mm:ss or similar.

lancelot-moon commented 4 years ago

For your 1st point: TBH, month/date/year is weird in English. At school, our English teacher taught us "date month, year". But you can see month/date/year everywhere in AG products. ex: https://crowdin.com/translate/adguard-applications/17492/en-zhtw#3858028 last updated 8/5/2019 at 3:35 PM Is it August or May?

Screenshot: ![image](https://crowdin-screenshots.downloads.crowdin.com/22313/365951/650/original.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIGJKLQV66ZXPMMEA%2F20200322%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200322T140150Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86400&X-Amz-Signature=9a593106dfbf09d6bf67867b7f8177357616fceb80315b8905a5c027a3aa2f94)

I think it's more correct if last updated {1} at {2} -> last updated at {2} on {1}. But AG team like to use month/date/year at hour:minute in English. Fortunately, time format in most AG products is localized. The time format may be only problematic to English users. yyyy-mm-dd hh:mm:ss is much better than mm/dd/yyyy hh:mm:ss! For your 2nd point: In the past, we requested localized and detailed time format, including sec. https://github.com/AdguardTeam/AdGuardHome/issues/624 But sec is ignored in v0.101.0.
Screenshot: ![image](https://i.imgur.com/lmIJrwH.png)

ghost commented 4 years ago

@lancelot-moon https://github.com/AdguardTeam/AdGuardHome/issues/1421#issuecomment-602088582

deanishe commented 4 years ago

TBH, month/date/year is weird in English.

Not just in English. It's a format that's hardly used except by Americans.

Of all the commonly-used formats, m/d/y is basically the worst possible choice. It's ambiguous and easily confused with the far more common d/m/y.

I'd suggest either using YYYY-MM-DD or writing the month as a word to remove the ambiguity (e.g. "1 Jun" or "Jun 1").

Quijib0 commented 3 years ago

So I notice in 0.103.3 that basically the format got switched the other way. Really would be nice for those of us that don't live in Europe to have a choice to have it in the other format: mm/dd/yyyy. I wouldn't complain about yyyy-mm-dd though, at least the day is in the right order (for my eyes).

If it is localized, then it's not working on my end. Router is using correct local format.

deanishe commented 3 years ago

Really would be nice for those of us that don't live in Europe

*that live in the US

ameshkov commented 3 years ago

Should be a little better in v0.104, I am not sure why we the code of formatDateTime was that confusing, now it's rather simple - we always use browser locale to format the date: https://github.com/AdguardTeam/AdGuardHome/commit/8856dd6e4c15caddba2270d9c05995ba283a7b9a

sourpatched commented 2 years ago

Is this option going to be added to next update?

I've spent hours trying to fix this, thinking if was my OS or browser.

lutfor-diu commented 1 year ago

any update about this feature request :)