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? wink

The only correct way would be to convert the airdate and time to the local (user) timezone and generate the lists accordingly smile

http://next-episode.net/sig/sig.php?alias=default&kk=f2f78bbc2ae515f1a55746f794066001

2 (edited by BlackBox 2005-11-27 09:58:35)

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 wink
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? wink

Thanks for considering smile

PS: If your last name Claus big_smile then I wish me this feature for xmas smile Today is the first Advent - so happy holiday!

http://next-episode.net/sig/sig.php?alias=default&kk=f2f78bbc2ae515f1a55746f794066001

Re: Today, Tomorrow, Yesterday Lists

Ah well, will you answer at least once to that: Why isn't the home page working for ya? And have you tried experimenting with the timezones? smile
I'm taking into consideration your last request smile

http://next-episode.net/sig/sig.php?alias=default&kk=5ba0ff0eba240dd51b6bf07fff0abb0e

Re: Today, Tomorrow, Yesterday Lists

Uh - I thought I already answerd to that question several times hmm

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 wink

So if you implement my last request (almost) everybody would be just fine and would have nothing to complain about big_smile

Thx again! smile

http://next-episode.net/sig/sig.php?alias=default&kk=f2f78bbc2ae515f1a55746f794066001

Re: Today, Tomorrow, Yesterday Lists

ok ok I know it's confusing I admit, but I don't see what's the problem in toying with the timezone settings until it gets fine? trust me, it's possible wink
and yeah, I have to fix that eventually tongue

http://next-episode.net/sig/sig.php?alias=default&kk=5ba0ff0eba240dd51b6bf07fff0abb0e

6 (edited by h0rnytoad1 2005-12-05 04:25:14)

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

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")

http://next-episode.net/sig/sig.php?alias=default&kk=5ba0ff0eba240dd51b6bf07fff0abb0e

8 (edited by BlackBox 2005-12-07 00:03:35)

Re: Today, Tomorrow, Yesterday Lists

Actually I can't, but its definitely gotten worse neutral
Right know even the new Past and Future lists are messed up. They seem to be shifted to the past, so I see the show - like Desperate Housewives - which aires sundays in the saturday list. If you would adjust the timezone to the airdate then it should be in the monday list wink

Lets see how these things evolve - I'm always open for surprises big_smile

Hmm - my time just went to 1 am and now the lists are OK, which means, that the shows are listed on there actual air date - like sunday for DHw smile

http://next-episode.net/sig/sig.php?alias=default&kk=f2f78bbc2ae515f1a55746f794066001

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 (edited by h0rnytoad1 2005-12-07 06:18:37)

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)

Re: Today, Tomorrow, Yesterday Lists

ok thanks, I'm on it smile

http://next-episode.net/sig/sig.php?alias=default&kk=5ba0ff0eba240dd51b6bf07fff0abb0e

Re: Today, Tomorrow, Yesterday Lists

test it if it's ok now (the calendar too).

http://next-episode.net/sig/sig.php?alias=default&kk=5ba0ff0eba240dd51b6bf07fff0abb0e

Re: Today, Tomorrow, Yesterday Lists

Wow - this seems to work now - finally wink
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! smile

http://next-episode.net/sig/sig.php?alias=default&kk=f2f78bbc2ae515f1a55746f794066001

14 (edited by h0rnytoad1 2005-12-07 23:49:22)

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 hmm

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 (edited by h0rnytoad1 2005-12-08 00:07:59)

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.

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)

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

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 (edited by h0rnytoad1 2005-12-10 03:27:53)

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.

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 !

Re: Today, Tomorrow, Yesterday Lists

smile))) cool

http://next-episode.net/sig/sig.php?alias=default&kk=5ba0ff0eba240dd51b6bf07fff0abb0e

Re: Today, Tomorrow, Yesterday Lists

doh, now its 20h51 saturday night and the right hand calendar is messed up like before.

Re: Today, Tomorrow, Yesterday Lists

don't worry, it'll be fixed for real smile I just wanted to see how bad it was messed up smile

http://next-episode.net/sig/sig.php?alias=default&kk=5ba0ff0eba240dd51b6bf07fff0abb0e

Re: Today, Tomorrow, Yesterday Lists

lol

well its too soon now to tell (4pm), i'll try to remember to check later tonight

Re: Today, Tomorrow, Yesterday Lists

OK - still not correct neutral 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 tongue

http://next-episode.net/sig/sig.php?alias=default&kk=f2f78bbc2ae515f1a55746f794066001