PiAware Skyview Time

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.

1 Like

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.

1 Like

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 :slight_smile:

Before Modifications:
image

After Modifications:
image

PR submitted:

1 Like

:+1:
Writing Month in words rather than in numbers removes all ambiguity.

1 Like

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 todayDate the US agrees with the rest of the world

1 Like

Obligatory xkcd: xkcd: ISO 8601

1 Like