The time in the PiAware Skyview is in 12 hour format. Can an option be added to change to 24 hour format?
Whit
The time in the PiAware Skyview is in 12 hour format. Can an option be added to change to 24 hour format?
Whit
If changes are being made, could I ask for an international date format?
yyyy/m/d for preference
Piaware shows time in UTC 24h format yyyy/mm/dd/hh/mm/ss, but Skyview shows local time as indicated. Might be nice to have both local and UTC and choice of US or international format? Most piaware feeders are in the US I believe.
Not a big deal here though.
My Pi is set to en_GB locale, but SkyView 3.7.1 shows date as ā5/4/2019ā which means 5th of April.
But today is 4th of May. How can I change this?
Maybe universal option would be to display date as āMay 4 2019ā as thereās definitely a lot of free space for 1-2 extra characters, or allow it to be easily configured.
Ah got it, it depends on browser language which was set to en_US.
Still, I would personally prefer to see non-ambiguous datetime there by default, either
2019-05-04 14:35
or
May 04 2019 14:35
second option will eliminate ambiguity, while still keeping US folk happy, because currently looking at date like 05/04/2019 no one can tell if it is April on May without additional context (like what browser language is set, what os locale is set, what the software respects - OS locale or browser locale, etc.). And even then donāt assume anything. Good example is my setup, I am US resident and you would expect MM/DD/YYYY on my computers but you will be wrong, as I have my OS locales set to en_GB because that means more internationally compatible date and time formats everywhere. Also Iām from Russia and āmiddle endianā date breaks my brain everytime.
Edit file script.js
sudo nano /usr/share/dump1090-fa/html/script.js
Ctrl+w, then type (or copy-paste) following
toLocaleString
Press Enter key
The cursor will jump to
function refreshClock() {
$('#clock_div').text(new Date().toLocaleString());
var c = setTimeout(refreshClock, 500);
}
Add
"en-GB", {hour12:true}
inside brackets of
toLocaleString()
,
so it becomes like this:
function refreshClock() {
$('#clock_div').text(new Date().toLocaleString("en-GB", {hour12:true}));
var c = setTimeout(refreshClock, 500);
}
Save (Ctrl+o), and Close (Ctrl+x)
Go to Skyview in browser, and reload browser (Ctrl+F5)
Check the date
Before Modifications:
After Modifications:
PR submitted:
Writing Month in words rather than in numbers removes all ambiguity.
Iām really tired of that ambiguity everywhere. Every single day I see dates like 1/12/2018 on websites and have to do the guesswork like āWell, is that January because itās US website, or do they honor my locale set to GB English and thatās December?ā
or maybe ābest beforeā date on Swiss chocolate. Do they use Swiss dd/mm/yyyy format because itās made there and it has expired, or do they use American mm/dd/yyyy format because itās sold in US and itās still fresh? Better throw that away as itās not clear.
I would never throw out Swiss chocolate without at least tasting it first regardless of the date.
At least today the US agrees with the rest of the world
Obligatory xkcd: xkcd: ISO 8601