lyneca / eidoclock

Clock website for the Plains of Eidolon
https://clockofeidolon.com
MIT License
21 stars 9 forks source link

Timer is about 3 minutes slow. #7

Closed VeloxAzo closed 6 years ago

VeloxAzo commented 6 years ago

With the release of the new Eidiolons, the timer should be synced up to when the Eidolon bounties become available. For all other purposes, a ball park estimate of when night starts and ends works fine. Hunts how ever are very time sensitive.

Also suggesting a togglable 5 minute warning alarm for both the start and end of the night cycle.

gleitoncampos commented 6 years ago

Yes, the clock is 3~4 minutes late. The lures auto destroy even with 4 minutes left on clock. Needs a little sync.

Wampa842 commented 6 years ago

Hi!

Sorry this hasn't been addressed before - I'll look into it as soon as I can.
In the meantime, when you log into warframe, could you please take a look at the bounty board and send me the difference between the time you see there and the time that's on the website?

@VeloxAzo, I'll see what I can do about adding custom alarms.

gleitoncampos commented 6 years ago

sync_clock_2 sync_clock_1

Here is the print

gleitoncampos commented 6 years ago

Forget the previous prints. I will take another asap to see if after the new update, the time changed.

Wampa842 commented 6 years ago

Thanks for the screenshots, they might help anyway.

That's a much larger difference than I had expected, and it might be due to an oversight I've discovered in my code. If you could load the website, open the console (Ctrl+Shift+K on Firefox, Ctrl+Shift+J on Chrome) and tell me what you see, it would help me pin down or rule out this particular issue. Normally you'd see "Fetched Cetus time" and a large number. If the error occurs, it'll show an error message about "loading mixed/active content" and a few more lines of warnings.

Unfortunately Lyneca has been AWOL for several days and I can't push the changes until he approves it.

gleitoncampos commented 6 years ago

screenshot from 2018-04-13 12-59-56

I received the error that you said about mixed content

Wampa842 commented 6 years ago

Thanks for your help.

Until the issue is fixed, it might be possible to bypass it by connecting to http://clockofeidolon.com instead of https://clockofeidolon.com.

In the meantime, I'll continue to log the time discrepancies and try to find a pattern.

gleitoncampos commented 6 years ago

Wow... I don't notice that exist two versions. Really, the https version is 11 minutes late compared with the http. Thanks for the advice.

Wampa842 commented 6 years ago

The issue is that the web app we currently use to fetch the Cetus bounty time supports only the unencrypted HTTP protocol, but most web hosts (thankfully) have been switching over to encrypted HTTPS. But when a browser loads a webpage through HTTPS that in turn loads active content (in this case, JSON data containing the Warframe world state) through HTTP, it basically compromises the security provided by HTTPS. Browsers don't allow that.

Most web servers no longer serve HTTP but redirect the request to HTTPS. clockofeidolon.com seems to be hosted on a web server that doesn't do that, which is why my trick works.

Zarremgregarrok commented 6 years ago

http://clockofeidolon.com is still about one minute slower to report night compared to https://hub.warframestat.us/timer# https://clockofeidolon.com is so far off, that using it for tridolons is basically impossible.

Wampa842 commented 6 years ago

As I've mentioned before, https://clockofeidolon.com is working incorrectly at the moment. I've made a patch to fix the issue, but it won't be released until @lyneca approves my pull request.

I'll continue to investigate the one minute discrepancy. It seems to be between one and two minutes, more or less consistently.

ghost commented 6 years ago

Thanks for helping out so much, I use the engine in a Dsicord bot for a server and this kind of time inconsistency can be a bit of an issue.

Alexander-Poganatz commented 6 years ago

For the one minute discrepancy between hub.warframestat.us and clockofeidolon, the former uses the expiry time of Cetus bounties to calculate the 'time until' while the latter uses the activation date. I did a bit of messing around and 'Expiry - Activation' is less than 150 minutes (149.35 at the time I tested).

The updateTime function is already set up to assume the eido_timestamp variable is the bounty expiry time instead of the activation time since it subtracts 150 minutes to determine the start time. The getCetusTime function just has to be updated to get the Expiry time instead of Activation.

When I tested it, my 1 minute difference got reduced to a 20 to 22 second difference compared to hub.warframestat.us.

It is only a few seconds off compared to the in game bounty timer. capture

I'll get to work on a submission.

lyneca commented 6 years ago

Thanks! Looks like a good fix.