epg
epg copied to clipboard
Fix: elcinema.com wrong times
Describe your issue
I tried this source and it looked fine except that all the times are shifted by a few hours.
I cloned the repo and ran the script locally and the times are correct.
It seems that the times are using the local time zone of the script, so the will never work globally.
Is this the intended behavior?
You are right, the problem is in the wrong time zone, or more precisely in the conversion from the local time (specified on the site) to UTC.
Every time we make a request to elcinema.com, it tries to determine our time zone by our IP and adjust dates in the guide accordingly.
But because we use GitHub servers located all over the world, we can not specify any specific time zone in config in advance.
I tried to solve this problem with automatic time zone detection (https://github.com/iptv-org/epg/blob/master/sites/elcinema.com/elcinema.com.config.js#L80), but from my observations, it did not help.
But maybe someone else can find a solution to this problem in the future.
https://github.com/szenius/set-timezone Could you use this to action environment to a specific timezone, then use the same tz in config.js
The thing is that the time zone specified on server does not matter. The output on the site only changes when the IP address changes. On our side, we have only to guess the result for which country we received the response.
Here are some examples:
UK IPv4, no cookies (Europe/London: UTC+1)
Germany IPv6, no cookies (Europe/Berlin: UTC+2)
But just in case I'm missing something, you can try to add this action to the workflow yourself and test it locally with nektos/act. What if it really helps.
Random idea that will possibly complicate things more than it will help but could we add an step that query the ipconfig.io
site to check where the runner is located and only continue if we receive a runner located in X country.
if we receive a runner located in X country
And what country should it be?