You are not logged in. Please login or register.
Active topics Unanswered topics
Pages 1 2 Next
You must login or register to post a reply
RSS topic feed
Posts: 1 to 25 of 30
- BlackBox
- Back from Black
- Offline
- Registered: 2005-11-06
- Posts: 6,429
Topic: Today, Tomorrow, Yesterday Lists
hi santah, IMHO the today, tomorrow, yesterday lists cant be fixed, because the timezone for the airdates are fix (ET, CT etc.). In which list do you want a show to appear, that is aired mondays at 10 PM ET and a user that accesses your site in CET - monday or tuesday? The only correct way would be to convert the airdate and time to the local (user) timezone and generate the lists accordingly
2 Reply by BlackBox 2005-11-27 09:53:41 (edited by BlackBox 2005-11-27 09:58:35)
- BlackBox
- Back from Black
- Offline
- Registered: 2005-11-06
- Posts: 6,429
Re: Today, Tomorrow, Yesterday Lists
Hi santah, I have another idea for a workaround. Actually these tree lists don't make any sense for people who don't live in the timezones where the shows air. Why don't you implement an alternate list which takes the countdown for the shows as reference. For example: - Shows that aired in the last 24 hours - Shows that air right now - Shows that air in the next 24 hours - Shows that air 24 to 48 hours from now The countdown feature seems to work pretty good - so the coding should be a piece of cake It would be nice if you could switch the view in the settings. The home page would really look great with this feature, because everybody would see the correct next episode and that is what this site is all about - right? Thanks for considering PS: If your last name Claus then I wish me this feature for xmas Today is the first Advent - so happy holiday!
- BlackBox
- Back from Black
- Offline
- Registered: 2005-11-06
- Posts: 6,429
Re: Today, Tomorrow, Yesterday Lists
Uh - I thought I already answerd to that question several times How can these lists work? For example - again - the airtime of a show is 9pm ET on sunday. But that would be 2am GMT monday. So it makes no sense, that this show is listet on my list on sunday... And besides that the date doesn't change correctly. so it's still switching to early to the next day. And as I see in the shoutbox, I'm not the only one who get's confused by the airtimes and dates So if you implement my last request (almost) everybody would be just fine and would have nothing to complain about Thx again!
6 Reply by h0rnytoad1 2005-12-05 04:24:33 (edited by h0rnytoad1 2005-12-05 04:25:14)
- h0rnytoad1
- Member
- Offline
- Registered: 2005-10-27
- Posts: 76
Re: Today, Tomorrow, Yesterday Lists
i too would like to see the home page fixed, i've set my settings to Gmt-5 , wich is what my timezone is, and i still see tomorrow's shows as today's and its not even 11h20pm its nice to add new options and settings, but i would really like to see the home page fixed first. And you know, there's no need to input all those timezones with country and city name, its just more work for you. A simple 24hour set of timezones with their names (est, central, etc) will work fine for most people. anyway, good luck on the website, HT
- santah
- Administrator
- Online
- Registered: 2005-10-18
- Posts: 7,316
Re: Today, Tomorrow, Yesterday Lists
can you (anyone) tell me the exact time, when the show's today episodes switch to tomorrow's? (for example, "in 10pm everything is fine, after 10pm todays episodes switch to tomorrow's")
8 Reply by BlackBox 2005-12-06 23:59:12 (edited by BlackBox 2005-12-07 00:03:35)
- h0rnytoad1
- Member
- Offline
- Registered: 2005-10-27
- Posts: 76
Re: Today, Tomorrow, Yesterday Lists
well its 9pm right now, things seem fine, i'll wait on the hour at 10, 11 and midnight.
10 Reply by h0rnytoad1 2005-12-07 03:11:46 (edited by h0rnytoad1 2005-12-07 06:18:37)
- h0rnytoad1
- Member
- Offline
- Registered: 2005-10-27
- Posts: 76
Re: Today, Tomorrow, Yesterday Lists
its 22:10, the home page changed to tomorrow's eps under the today headline. i'm at gmt -5 (canada/quebec)
- santah
- Administrator
- Online
- Registered: 2005-10-18
- Posts: 7,316
Re: Today, Tomorrow, Yesterday Lists
ok thanks, I'm on it
- santah
- Administrator
- Online
- Registered: 2005-10-18
- Posts: 7,316
Re: Today, Tomorrow, Yesterday Lists
test it if it's ok now (the calendar too).
- BlackBox
- Back from Black
- Offline
- Registered: 2005-11-06
- Posts: 6,429
Re: Today, Tomorrow, Yesterday Lists
Wow - this seems to work now - finally Just one small change request. So when all the times and dates are calculated to the local timezone the airtime and date of the ep should also be calculated to the local timezone. This should be easy because everything else is already calculated correctly. You did a really good job - thanks santah!
14 Reply by h0rnytoad1 2005-12-07 23:43:11 (edited by h0rnytoad1 2005-12-07 23:49:22)
- h0rnytoad1
- Member
- Offline
- Registered: 2005-10-27
- Posts: 76
Re: Today, Tomorrow, Yesterday Lists
for me, gmt-5 canada, its only 18:16 and it has thursday's shows for today (wednesday). i dont know anything about php, but im sure there are php coders on php programming forums who could help. is there a php function to get the date on the user's system ? Something tells me the whole process of setting the right day for "today" isn't as simple as say getdate() on the user's system what you need to do, is convert the user's time to the server's time. you do this by looking at the user's timezone and the server's timezone and the server time/date. How about this: get the server's date and time (the one your script runs on, it should be a local command) you should already know wich timezone its in, otherwise contact the server admin. Now get the difference between the timezone of the user and the server's, (either positive or neg value, its fine) add it to the server's time, (it will either increase or decrease the variable of server time, its fine) you should have either before or >=midnight (24:00.00 military time not am/pm U.S. time). if >= midnight then add +1 to server date. Then you'll know the user's date, you can then pull the right shows from your database for the user for the right day. I'm gonna put an example of function, this isn't real code, i just pulled it out of my head, so i hope it makes sense, if not pm me, for antispam reasons, check my mail in your database;-) i don't know anything about php so you'll have to replace with the right functions : function get_user_date(user_id is a primary_key_in_database_to_get_user_info) server_date = server.getdate(day) (it should give you the day's numerical date, like the 7th day of the month) server_time = server.gettime(now) user_date = 0 (use for later) server_tzdiff = server.timezone - user.timezone (positive or negative values are fine. user.timezone is from your database) server_time = server_time + server_tzdiff if server_tzdiff(hour_only) => 24 then user_date=server_date+1 return get_user_date=user_date With all this info, you should be able to pull the data about shows from database with the right date. hth, HT
15 Reply by h0rnytoad1 2005-12-08 00:05:07 (edited by h0rnytoad1 2005-12-08 00:07:59)
- h0rnytoad1
- Member
- Offline
- Registered: 2005-10-27
- Posts: 76
Re: Today, Tomorrow, Yesterday Lists
um here's an idea, simpler than the equations, just compare the user's time zone in your database with the server's. if its the same, then use the server's date to pull the shows from database. if its lower then it should still be today for them too. if its higher then because you need to find the difference between the user's time zone and the server's timezone and add that to the server's time (hour) to know if the user's time is still before or after midnight for them. then you can just add 1 to the server's date variable and voila, you can pull the right shows for the user.
- h0rnytoad1
- Member
- Offline
- Registered: 2005-10-27
- Posts: 76
Re: Today, Tomorrow, Yesterday Lists
let me know if this helps, i too had a heck of a time trying to figure out timezones once ;-) (pun intended, lol)
- h0rnytoad1
- Member
- Offline
- Registered: 2005-10-27
- Posts: 76
Re: Today, Tomorrow, Yesterday Lists
its 19:41 (7:41pm) and the home page so far seems ok. today's eps are correct at displaying thursday's eps. i'm gonna try to check at 10pm
- h0rnytoad1
- Member
- Offline
- Registered: 2005-10-27
- Posts: 76
Re: Today, Tomorrow, Yesterday Lists
whoops, spoke too soon, the calendar onthe right on the home page, shows friday's shows in the thursday box.
19 Reply by h0rnytoad1 2005-12-10 03:27:09 (edited by h0rnytoad1 2005-12-10 03:27:53)
- h0rnytoad1
- Member
- Offline
- Registered: 2005-10-27
- Posts: 76
Re: Today, Tomorrow, Yesterday Lists
its 22:25, the home page still loks good except for the calendar on the right, it gives me : Saturday Grey's Anatomy Season: 2 Ep: 12 The Simpsons Season: 17 Ep: 8 but we're friday, and these shows play on sunday.
- h0rnytoad1
- Member
- Offline
- Registered: 2005-10-27
- Posts: 76
Re: Today, Tomorrow, Yesterday Lists
its now 1:24(am) friday night (aka saturday morning), the home page displays in both the center and right hand side the correct days and eps for each days. congrats santah, looks like you fixed it !
- santah
- Administrator
- Online
- Registered: 2005-10-18
- Posts: 7,316
Re: Today, Tomorrow, Yesterday Lists
))) cool
- h0rnytoad1
- Member
- Offline
- Registered: 2005-10-27
- Posts: 76
Re: Today, Tomorrow, Yesterday Lists
doh, now its 20h51 saturday night and the right hand calendar is messed up like before.
- h0rnytoad1
- Member
- Offline
- Registered: 2005-10-27
- Posts: 76
Re: Today, Tomorrow, Yesterday Lists
lol well its too soon now to tell (4pm), i'll try to remember to check later tonight
- BlackBox
- Back from Black
- Offline
- Registered: 2005-11-06
- Posts: 6,429
Re: Today, Tomorrow, Yesterday Lists
OK - still not correct And its starting to confuse me. Right now I have Sun 11 pm GMT+1 1st - my watchlist shows the Nip/Tuck Episode as Tue next - which is not correct, because 2nd - the TTY lists show next The Simpson ep for Tomorrow, which is correct, because it airs at 8 pm US-Central, which is Mon for my timezone, but 3rd - the Calender is incorrect, because it shows The Simpsons in the Future list for Sun, which should be Mon. I hope this cleared things up for you - santah Have a lot of fun while fixing
Posts: 1 to 25 of 30
Pages 1 2 Next
You must login or register to post a reply
|