You are here

Update the offset time zone to UTC

7 posts / 0 new
Last post
Mark_J
Offline
Mark_J's picture
Donator
Joined: 4 years
Last seen: 11 months
Update the offset time zone to UTC

Hi,

Would you please update offset (Time Zone) for the following sitein from local time in Eygpt +0200 to UTC time +0000 ?
- elcinema.com.channels

I believe WG+ team should make the default offset (time zone) is UTC for all sitein pack list.

Thanks

mat8861
Offline
WG++ Team memberDonator
Joined: 9 years
Last seen: 1 hour

We can't make timezone always "UTC" some site calculate time based from the country, like this one.(if i am in america i need to set America not Egypt or UTC)
So this site needs "your" timezone to be set to have correct time. We can personalize it but we need to know your timezone.
or run wg2mp and xmltv time correct if you need utc with no time offset

WGMaker
Offline
WGMaker's picture
WG++ Team memberDonator
Joined: 12 years
Last seen: 7 hours
Is the support helpful?
support us
Mark_J wrote:

I believe WG+ team should make the default offset (time zone) is UTC for all sitein pack list.

Hi Mark_J ..

this is widely spread misconception and not a good idea, sorry.
WG++ follows the xmltv standard that specifies that the start and stop times must be in UTC. The timezone value in the siteini is set to a value to ensure just that. Part of the misconception is that if the siteini timezone is UTC , that that will make the times in UTC!!

The exact ways times in epg websites are manipulated to show the correct 'show times' for any user wherever in the world is described in my article http://www.webgrabplus.com/content/times-time-zones-and-dst-corrections . I know it's not an easy read, but that is because it is not so simple as it looks.

The essence of it is to realize that there are two timezones necessary to get all correct.

1. The timezone to get the xmltv output into UTC .. that's the one in the SiteIni .. the 'source' timezone
(normally of the country where the show is 'aired')
(a complicating and confusing factor for this SiteIni timezone value is that some tvguide sites have their internal data already in UTC, while tvguide webpage displays it in the local times .. in that case WG++ uses SiteIni timezone=UTC)

2. The timezone of the users location .. the 'target' timezone

Maybe here just an example , more or less as the one from http://webgrabplus.com/faq#faq_1238 :

programme start="20200930183000 +0300" stop="20200930190000 +0300" channel="My channel"

- The above show starts at 2020/09/30 18:30 at the 'source' location.
- This source location is in timezone UTC+3 , maybe Finland, summertime, example SiteIni timezone=Europe/Helsinki.
- To make the xmltv time in UTC (as needed) the offset +0300 is added, which makes the UTC start time of the show 2020/09/30 15:30.
- Realise that the SiteIni timezone actual UTC offset is corrected for summertime by WG++ ! The default UTC offset for Finland is UTC+2 !
- Because the xmltv times are always in UTC, the xmltv can be used anywhere in the world. The correction for the target timezone must be done by the program that reads the xmltv into some tvguide viewer or PVR.
- E.g. Suppose you are in another time zone (eg. UTC-5) then this show starts locally at 2020/09/30 20:30.

I hope I made it clear the the SiteIni timezone cannot be in UTC for all siteini's. Besides completely wrong offset times (for most correctly functioning xmltv readers/importers) it will completely ignore the summertime/wintertime influence.

If , still the times that show in your local tvguide /PVR are wrong, the correction can be done by one of the two time correction utilities that are mentioned at the end of the article.

Sorry, there doesn't seem to be a shorter explanation. ..

Mark_J
Offline
Mark_J's picture
Donator
Joined: 4 years
Last seen: 11 months

Hi,

Because the xmltv times are always in UTC, the xmltv can be used anywhere in the world. The correction for the target timezone must be done by the program that reads the xmltv into some tvguide viewer or PVR.

Hope you get my point.

Thanks.

Mark_J
Offline
Mark_J's picture
Donator
Joined: 4 years
Last seen: 11 months
WGMaker wrote:

Mark_J wrote:
I believe WG+ team should make the default offset (time zone) is UTC for all sitein pack list.

Hi Mark_J ..
this is widely spread misconception and not a good idea, sorry.
WG++ follows the xmltv standard that specifies that the start and stop times must be in UTC. The timezone value in the siteini is set to a value to ensure just that. Part of the misconception is that if the siteini timezone is UTC , that that will make the times in UTC!!
The exact ways times in epg websites are manipulated to show the correct 'show times' for any user wherever in the world is described in my article http://www.webgrabplus.com/content/times-time-zones-and-dst-corrections . I know it's not an easy read, but that is because it is not so simple as it looks.
The essence of it is to realize that there are two timezones necessary to get all correct.
1. The timezone to get the xmltv output into UTC .. that's the one in the SiteIni .. the 'source' timezone
(normally of the country where the show is 'aired')
(a complicating and confusing factor for this SiteIni timezone value is that some tvguide sites have their internal data already in UTC, while tvguide webpage displays it in the local times .. in that case WG++ uses SiteIni timezone=UTC)
2. The timezone of the users location .. the 'target' timezone
Maybe here just an example , more or less as the one from http://webgrabplus.com/faq#faq_1238 :
- The above show starts at 2020/09/30 18:30 at the 'source' location.
- This source location is in timezone UTC+3 , maybe Finland, summertime, example SiteIni timezone=Europe/Helsinki.
- To make the xmltv time in UTC (as needed) the offset +0300 is added, which makes the UTC start time of the show 2020/09/30 15:30.
- Realise that the SiteIni timezone actual UTC offset is corrected for summertime by WG++ ! The default UTC offset for Finland is UTC+2 !
- Because the xmltv times are always in UTC, the xmltv can be used anywhere in the world. The correction for the target timezone must be done by the program that reads the xmltv into some tvguide viewer or PVR.
- E.g. Suppose you are in another time zone (eg. UTC-5) then this show starts locally at 2020/09/30 20:30.
I hope I made it clear the the SiteIni timezone cannot be in UTC for all siteini's. Besides completely wrong offset times (for most correctly functioning xmltv readers/importers) it will completely ignore the summertime/wintertime influence.
If , still the times that show in your local tvguide /PVR are wrong, the correction can be done by one of the two time correction utilities that are mentioned at the end of the article.
Sorry, there doesn't seem to be a shorter explanation. ..

For example this line:

The Start and end offset should be +0000

The default should be UTC.

Because the xmltv times are always in UTC, the xmltv can be used anywhere in the world. The correction for the target timezone must be done by the program that reads the xmltv into some tvguide viewer or PVR.

WGMaker
Offline
WGMaker's picture
WG++ Team memberDonator
Joined: 12 years
Last seen: 7 hours
Is the support helpful?
support us
Mark_J wrote:

For example this line:
The Start and end offset should be +0000
The default should be UTC.
Because the xmltv times are always in UTC, the xmltv can be used anywhere in the world. The correction for the target timezone must be done by the program that reads the xmltv into some tvguide viewer or PVR.

I have the impression that you still think that when the SiteIni timezone is 'always' UTC , that the resulting times are in UTC! That is not so .. the SiteIni timezone only specifies the timezone rules that are used by the epg data of the source website. If the times there are in UTC then the SiteIni timezone must be UTC. If the epg source website uses local times (which is usual) the SiteIni timezone must be the timezone of these local times.
In that way .. all xmltv that is produced by WG++ have the time values in UTC !! That maybe a bit difficult to realise because of the offset in the xmltv times. But the offset is only there to correct the local time (if not UTC already) into UTC.

We have a utility WG2MP (http://webgrabplus.com/sites/default/files/download/utility/WG2MP/WG2MP.zip) that converts all times into the format without this offset (without changing its ultimate value, that remains UTC)
So its format changes from yyyyMMddhhmmss +/-hhmm to just yyyyMMddhhmmss ... plain UTC

Example using WG2MP :
before start="20200602141500 -0500"
after start="20200602191500"

This format without the offset is exactly the same as if it has an offset +0000. Which is what you ask ..

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 46 min

actually wg2mp converts time to the users local time and not utc(unless the users timezone is utc).
jan had given me the source code for wg2mp some years ago and i did alter it to adjust all times to utc and a offset of +0000.
but unfortunately its on my linix pc which i havnt used in a few years.
maybe jan can create a new file called wg2utc.exe

Log in or register to post comments

Brought to you by Jan van Straaten

Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: servercare.nl