QOAL / localisetime

A web extension for localising times found in web pages
GNU General Public License v3.0
14 stars 0 forks source link

Detect accidental Standard/DST mix ups #8

Open QOAL opened 3 years ago

QOAL commented 3 years ago

Sometimes people accidentally mix up Standard/DST when writing a timezone abbreviation. An example is writing PDT when they mean PST.

We should be able to safely detect these mix ups for American based timezones, as we already have support for DST agnostic zones. (PT, ET, MT, CT)

Doing this for the whole world might be a real pain. We'd probably need to include a list of start dates for timezones. And of course, some countries stay on a single timezone for the whole year, yet share a timezone with countries that do change, so avoiding confusion for those countries is important.

It might be best to only alert the user that the converted time may be incorrect, and also present a fixed time when hovered over or clicked. Doing so would still slow the user down, as they may have to interact with the webpage to see the correct time. It may also confuse the user if they haven't come across this alert before.

We could instead try and find out when the text was written by carefully looking for a time tag in the dom. (Look for a time tag in the parent, and keep doing that going up until one is found, or we hit the body) If we do find one, then we can use that to decide if it was originally written when that abbreviation was correctly used. This might still not be good enough if was written near a swap between the two, or if it explicitly references a date.

QOAL commented 1 year ago

The majority of this feature is available as of 1.30.0.

Support for non-NA time zones, and more accurate detection of intent/time of writing could still be added.

Improvements to the tooltip may also be worth exploring.