QOAL / localisetime

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

Conversion not working in Ecuador during DST #23

Closed Ductomaniac closed 1 year ago

Ductomaniac commented 1 year ago

Hi, Conversions have been incorrect since daylight saving times started. My system configuration is UTC-05:00. Conversions to EST worked fine before (they were the same time), but now they should be one hour apart but are still in the same time. So before DST, 4:00 PM EST should have converted to 4:00 PM, but after DST 4:00 PM EST should converte to 3:00 PM but it still converts to 4:00 PM

QOAL commented 1 year ago

Hmm, I don't really know what to do here. (But I feel like somebody had a similar issue once, and I don't think it was resolved) The following assumes you're using ECT.

I'm getting what I'd expect from some naive testing.

 Testing times in America/Guayaquil (1 tests)
 FAIL  4:00 PM ECT, 4:00 PM EST, 4:00 PM EDT, 4:00 PM ET
  Expected:
       Got: 15:00
  Expected:
       Got: 16:00
  Expected:
       Got: 15:00
  Expected:
       Got: 15:00
 Testing times in Etc/GMT+5 (1 tests)
 FAIL  4:00 PM ECT, 4:00 PM EST, 4:00 PM EDT, 4:00 PM ET
  Expected:
       Got: 15:00
  Expected:
       Got: 16:00
  Expected:
       Got: 15:00
  Expected:
       Got: 15:00

If you put 4:00 PM EST, 4:00 PM ECT in to the Sandbox, do you get anything unexpected? (Paste the result here if so)

This webpage, that I just knocked up, has a section that displays all the info the extension uses that's provided by your browser. The only real thing of interest is getTimezoneOffset, and I expect that'll be 300 for you?

Please do correct me if I have anything wrong, or I've misunderstood.

Ductomaniac commented 1 year ago

An example here, this is what you typed: image And these are the conversions: image The former should defintiely be 3:00 PM in my local time.

image

Before pushing the convert button: image

After pushing the convert button: image

QOAL commented 1 year ago

Ok, my mind is actually awake this morning. Could you please check which time zone you have ECT set to in the settings? It may be on the default which is Eastern Caribbean Time. image

Ductomaniac commented 1 year ago

It was indeed set to Eastern Caribbean Time. But as far as I can tell switching it to Ecuador Time has made no difference at all.

QOAL commented 1 year ago

EST has an offset of 300, the same as ECT. So they will show the same times. Should you be using EDT (or just ET) instead now?

Ductomaniac commented 1 year ago

To be honest I don't know what EDT or ET are. I just want the correct times to show, and when it's 4:00 PM in EST it is 3:00 PM in Ecuador. I can make the change manually if you show me how, but the app should definitely just automatically work for us in places that don't do Daylight Savings Time.

QOAL commented 1 year ago

Ok, so EST is Eastern Standard Time, this is only observed for half the year. Then it switches to EDT, or Eastern Daylight Time. ET is a common way to refer to Eastern Time regardless of the time zone it's currently using.

So this switch from EST to EDT is what recently happened, and it's causing you a headache.

I have just added support for handling DST mix ups with American time zones (PT, MT, CT, ET) By default it'll automatically display the corrected localised time, so your EST should be fixed. (It will visually mark such times with a coloured fringe) You can disable this behaviour in the settings, and the time will not be corrected on the page, instead the tooltip will mention it.

Please let me know, once you have 1.30.0, if this resolves your issue. It's available now for Firefox, and will be shortly available for Chrome.

Ductomaniac commented 1 year ago

Fantastic! That fixed it, thank you!

QOAL commented 1 year ago

That's great to hear!