|
|
View previous topic :: View next topic |
Author |
Message |
mazz0310
Posts: 31
|
Posted: Mon Mar 07, 2011 1:39 pm Post subject: |
|
|
jamesking wrote: | mazz0310 wrote: | Wow that's awesome news. I still literally use this daily...and other than the timezone thing it works absolutely perfectly for me and I still appreciate all the work done on V1.
|
Hi,
The new version is basically the same code (!) but with more up to date php classes. I am testing it for a month or so, just to check it doesn't break anything.
I've also now read and actually understood most of the code! So it's much easier for me to make modifications to how the output shows up in google calendar.
I'd like to get to the bottom of this time zone problem. There is a Time Zone ID property of an ical event which we could set, but I'd like to be sure it's easy to make it work for everyone.
Can you please tell me a few things to help me figure it out?
1. If you navigate in your web browser or an RSS reader to the URL of your RSS feed, Air Date and Air Time does it give for the first show in your list?
2. At http://www.myepisodes.com/cp.php , under "Regional settings", what time zone do you have, and what episode offset do you have?
3. If you go to the URL of your calendar (eg, http://www.jamesking.co.uk/myepisodes/myepisodes2ical.php ) you will see the episodes listed as iCal. What air date and air time show up here for the first episode?
4. Under Google Calendar, Calendar Settings, General, what country and current time zone is set?
5. What is your webhost (where the PHP script is running) and what country are they in (if you know!)
Thanks!
James |
Hey James,
Sorry for such a long gap between my response. If you still need the info here are my results:
1) Yes, i believe the date and time DOES show for the first show on the RSS feed.
<tr><td>Air Date:</td><td>06-Jan-2011</td></tr><tr><td>Air Time:</td><td>01:00</td></tr>
2) I have an EST timezone set, with an offset of 5
3) This is the time/date for my first item:
DTSTART;VALUE=DATE-TIME:20110106T010000 DTEND;VALUE=DATE-TIME:20110106T020000 DTSTAMP:20110106T010000Z
4) Google Calendar timezone is:
Calendar Time Zone: (GMT+00:00) GMT (no daylight saving)
5) I'm just using Mezoka.com, it's just free webhosting, and I've also previously used 000webhost.com. Unfortunately I'm not sure where either is located.
Thanks again,
Dan |
|
Back to top |
|
|
jamesking
Posts: 25
|
Posted: Mon Mar 07, 2011 2:28 pm Post subject: |
|
|
OK, thanks.
So what time do you see this event as occurin in your google calendar?
I would expect it to be 1am - 2am as this is the time in the iCal event?
Is that right?
What would you prefer/expect to see?
Sorry for the additional questions, but it seems everything is consistent on the php side right up to the creation of the iCal event so I need to understand a bit more about the problem you're facing.
James |
|
Back to top |
|
|
mazz0310
Posts: 31
|
Posted: Mon Mar 07, 2011 7:42 pm Post subject: |
|
|
No no not at problem, I don't mind helping at all.....
The time actually shows up as 8 PM .... it's 1 AM in the RSS feed (EST - 5 = 0)
If you need more information feel free to ask.
More info:
RSS =
en-us 5111-2-7 [ Human Target (2010) ][ 02x07 ][ A Problem Like Maria (1) ][ 06-Jan-2011 ] http://www.tvrage.com/Human_Target/episodes/1065004566/02x07 <h3>Human Target (2010)</h3><table border='0'><tr><td>Episode Title: </td><td>A Problem Like Maria (1)</td></tr><tr><td>Episode #</td><td>02x07</td></tr><tr><td>Air Date:</td><td>06-Jan-2011</td></tr><tr><td>Air Time:</td><td>01:00</td></tr></table><p>Links:<br><a href='http://www.tvrage.com/shows/id-22699'>[Human Target (2010)] guide at www.tvrage.com</a><br><a href='http://www.tvrage.com/Human_Target/episodes/1065004566/02x07'>[A Problem Like Maria (1)] episode guide at www.tvrage.com</a>
iCal =
BEGIN:VEVENT CLASS:PUBLIC SEQUENCE:1 DTSTART;VALUE=DATE-TIME:20110106T010000 DTEND;VALUE=DATE-TIME:20110106T020000 DTSTAMP:20110106T010000Z LOCATION:http://www.tvrage.com/Human_Target/episodes/1065004566/02x07 SUMMARY:Human Target (2010) 02x07 - A Problem Like Maria (1) DESCRIPTION:A Problem Like Maria (1) UID:779f4fdc4bf585392abadba704b711ef END:VEVENT
On myepisodes.com it shows as 1 AM
On google Cal it shows as 8 PM |
|
Back to top |
|
|
jamesking
Posts: 25
|
Posted: Mon Mar 07, 2011 8:30 pm Post subject: |
|
|
how does this one show up for you?
http://jamesking.mezoka.com/EpisodeTest4/myepisodes2ical.php
I have realised on google calendar there are two time zone settings.
One for "your current time zone", which is under "Settings", "calendar settings". What does this one show?
And the other one is specific to each calendar so it can be seen in "Settings", "calendar settings", "calendars", then click on the name of the relevant calendar and it will say "Calendar Time Zone". It doesn't seem you can change this one, though I can't figure out how google determine what it is.
Can you tell me what they both show?
For me, I have UTC with 0 offset on Myepisodes. My current Time zone and calendar time zone are both set to GMT. This appears to work perfectly... |
|
Back to top |
|
|
mazz0310
Posts: 31
|
Posted: Mon Mar 07, 2011 9:33 pm Post subject: |
|
|
I believe that shows correct on my calendar......
It shows as Fringe 9 to 10 PM, which is correct.
And yeah unfortunately Google Cal doesn't allow me to change the individual timezone. |
|
Back to top |
|
|
jamesking
Posts: 25
|
Posted: Mon Mar 07, 2011 11:20 pm Post subject: |
|
|
For me, that shows up as 0200. I'm very confused.
Can you please answer the following:
1) What time zone is it where you live?
2) What time zones are in your google calendar? (your time zone, and the My episodes calendar time zone - possibly two different time zones?)
3) What time do you *want* Human Target to show up on your calendar?
4) What time does Human Target actually show up as in your calendar?
sorry for all the questions.
James |
|
Back to top |
|
|
mazz0310
Posts: 31
|
Posted: Tue Mar 08, 2011 12:07 am Post subject: |
|
|
jamesking wrote: | For me, that shows up as 0200. I'm very confused.
Can you please answer the following:
1) What time zone is it where you live?
2) What time zones are in your google calendar? (your time zone, and the My episodes calendar time zone - possibly two different time zones?)
3) What time do you *want* Human Target to show up on your calendar?
4) What time does Human Target actually show up as in your calendar?
sorry for all the questions.
James |
My Google calendars are seset to EST -5, my my episodes calendar is set to GMT +0.
Human Target should be at 8 pm, and it shows as 8 PM, however my calendar on my episodes.com shows it at 1 am (I use Google calendar more then the site)
If you want my calendars link I'll give it to you, and if it helps I'll let you log onto myepisodes.com as well. |
|
Back to top |
|
|
jamesking
Posts: 25
|
Posted: Tue Mar 08, 2011 12:15 am Post subject: |
|
|
Hi Dan,
Thanks for replying. I am really trying to understand what is going on but I'm getting more and more confused.
If you could PM me a link to your calendar that would be great. Maybe we should also take this conversation out of the thread for t he time being. |
|
Back to top |
|
|
jamesking
Posts: 25
|
Posted: Tue Mar 08, 2011 1:34 am Post subject: |
|
|
I'm trying to send you a PM but it appears it's getting stuck in my outbox.
Here's what I'm trying to send you:
Hey,
I think I've done it. I cannot automate it because it's unique to each user and it is not specified in the RSS feed so there is nowhere for me to get it from. But here's how you need to do it:
go here:
http://www.myepisodes.com/cp.php
Set the timezone to US/Eastern, and offset to 0 (ZERO).
Your RSS feed will now show 8pm for a show that is broadcast at 8pm Eastern.
Now, log on to mezoka, and edit myepisodes2ical.php. Where you have the line:
Quote: |
$ical->add_property('X-WR-CALNAME', 'TV Shows');
|
add the following line below it:
Quote: |
$ical->add_property('X-WR-TIMEZONE', "America/New_York");
|
With that extra line, Google Calendar will now recognise this as a Eastern time zone
Quote: |
Calendar Time Zone: (GMT-05:00) Eastern Time
|
Basically, you need to make the time zone in MyEpisodes.com consistent with what you specify in the php file. (ie, follow my above instructions!)
It might take a little while to refresh on Google Calendar. To force refresh, save the file with a slightly different name (eg, "myepisodes2ical2.php"), and then add this new file to google calendar as a brand new calendar. The new file should then show the right times?
Let me know. I am sure we're almost there!
James |
|
Back to top |
|
|
jamesking
Posts: 25
|
Posted: Tue Mar 08, 2011 1:43 am Post subject: |
|
|
When I upload a new version I will include this line of code for people in the future.
I found this list of timezones.
http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
People will need to choose the one which is consistent with the setting in the MyEpisodes Control Panel.
James |
|
Back to top |
|
|
mazz0310
Posts: 31
|
Posted: Tue Mar 08, 2011 1:48 am Post subject: |
|
|
jamesking wrote: | When I upload a new version I will include this line of code for people in the future.
I found this list of timezones.
http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
People will need to choose the one which is consistent with the setting in the MyEpisodes Control Panel.
James |
Awesome, thank you so much. I'll give that a try but I'm kind of disappointed with myself for not figuring it out on my own. Once my Google calendar is updated I'll let you know about the results. |
|
Back to top |
|
|
mazz0310
Posts: 31
|
Posted: Tue Mar 08, 2011 1:04 pm Post subject: |
|
|
James,
You're a genius and it does work. Thanks for your help/troubleshooting.
If anyone wants me to host their calendar I can try my best, but if you want to do it yourself just find a free webhost. There's a few out there. |
|
Back to top |
|
|
jamesking
Posts: 25
|
Posted: Tue Mar 08, 2011 1:09 pm Post subject: |
|
|
Sweet. Very pleased. My google-fu is strong this week :p |
|
Back to top |
|
|
Lordship-SE
Posts: 8
|
Posted: Sun May 08, 2011 4:56 pm Post subject: |
|
|
If I may:
Awesome work with your script jamesking. I took the liberty of tinkering with the timezones and I did the following:
MyEpisodes itself is set to Europe/Stockholm.
The script is running on mezoka which is set to UTC.
I added the following line to the script:
Code: | date_default_timezone_set('Europe/Stockholm'); |
and modified your line to:
Code: | $ical->add_property('X-WR-TIMEZONE', "Europe/Stockholm"); |
and it just works. Google shows the episodes when they really air.
One thing I found annoying though: The ical file has line breaks after 75 bytes which can interrupt links when reading just the ical file. Google accepts the ical file though and puts the link together again but then does a break of its own after 80 bytes which actually screws with the link to the episode if you have a long show name (Like "The Big Bang Theory") and want to have something like Code: | $icalevent->add_property('description', $title_data[1]." - ".$title_data[2]."\n".$item->get_permalink()); |
in the description. I think it has something to do with the definition of ical files, and the only workaround I found was to just not have long descriptions, but do you have a better idea?
Oh, and once again, that script of your is really smooth, installed like a charm on mezoka and worked out of the box, great job.
Cheers,
Lordship |
|
Back to top |
|
|
VortX
Posts: 8
|
Posted: Mon Jul 25, 2011 2:54 pm Post subject: |
|
|
I'm getting fsockopen error on mezoka since a few days.
Anybody having the same problem? Has this site disabled fsockopen too?
EDIT:
yes, mezoka has disabled fsockopen for security reasons. I'm now using 000webhost
btw, thanks Lordship-SE for your script modifications; I finally got the correct times displayed on Google Calendar |
|
Back to top |
|
|
mazz0310
Posts: 31
|
Posted: Sat Aug 20, 2011 1:17 am Post subject: |
|
|
VortX wrote: | I'm getting fsockopen error on mezoka since a few days.
Anybody having the same problem? Has this site disabled fsockopen too?
EDIT:
yes, mezoka has disabled fsockopen for security reasons. I'm now using 000webhost
btw, thanks Lordship-SE for your script modifications; I finally got the correct times displayed on Google Calendar |
Thanks, my calendar hasn't been updating for a long time and I never really cared much to try and fix it until tonight and I too got the fsockopen error. Thanks for letting me know that was the issue, I'm back up and running at 000WebHost |
|
Back to top |
|
|
blaise
Posts: 5
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
Main design by MW. Refitted to board by Hostile.
|