Hello, I have a question.
Does 'timezone' parameter in /api/3/tv/airing_today/ actually works? When I try to use, for example, timezone=Europe/Warsaw it doesn't seem to change anything while I should probably be getting different results. For instance, series which have their premiere in the evening on 25.01.2015 UTC -05:00. In Europe/Warsaw timezone (UTC +02:00) its actually past midnight next day (26.01.2015) so its not really "Today" for Europe/Warsaw
EDIT Also, I have noticed that total_results usually gives bad number on page 1
فیلم و نمایش تلویزیونی را نمیتوانید پیدا کنید؟ به سیستم وارد شوید تا آن را ایجاد کنید.
آیا میخواهید به این مورد امتیاز دهید یا به فهرست اضافه کنید؟
عضو نیستید؟
پاسخ توسط Travis Bell
در تاریخ ژانویه 25, 2015 ساعت 8:52 ب.ض
Hey drab,
We don't have airing times on TMDb, only original air dates. When using the timezones in conjunction with the
/tv/aiing_today
method, you are able to offset the "midnight" that we're using as the offset to get "today" relevant to which timezone you're requesting for that particular day.A simple example of this would be right now, it's 6:49 in Calgary (where I'm from) on January 25th. If I query the
/tv/airing_today
method with theAmerica/Edmonton
timezone, I get todays shows:Where if I query Sydney, Australia where it is 12:50 AM (January 26) I get the following results:
I get the shows that air on the 26th.
Could you elaborate about the total results? Both of my queries I used above look proper to me…
پاسخ توسط drab
در تاریخ ژانویه 26, 2015 ساعت 5:21 ق.ض
Hi, thanks for reply. You can see it right now when you query https://api.themoviedb.org/3/tv/airing_today?api_key=###. Page 1 shows total_results = 42, but page 2 shows total_results=43. Yesterday the difference was even bigger - page 1 showed like 43 and pages 2 and 3 showed 52.
Cheers
پاسخ توسط Travis Bell
در تاریخ ژانویه 26, 2015 ساعت 1:42 ب.ض
I'm seeing the same
total_results
on each page but I think I know what could be happening. It's a cache thing, since different pages can get cached at different times. Unlike most of our featured list pages, since/tv/airing_today
is much more granular and matters down to the minute, the caching for these pages should be removed. I've created a new ticket for this here and will look at it.Thanks.
پاسخ توسط drab
در تاریخ ژانویه 28, 2015 ساعت 6:07 ب.ض
I understand how 'timezone' parameters work but I think there is still something wrong with "Europe/Warsaw" timezone (maybe with others as well). Its 00:10 here in Warsaw and request gives me "old" (28.01) results while Europe/Berlin, for instance, is correct (29.01 premieres). Both Berlin and Warsaw are the same +1 timezone though.
Cheers
پاسخ توسط Travis Bell
در تاریخ ژانویه 28, 2015 ساعت 6:09 ب.ض
I believe it's the cache. Ticket 446 will need to be resolved, and then I believe this will work.
پاسخ توسط drab
در تاریخ ژانویه 28, 2015 ساعت 6:12 ب.ض
Oh, okay. I thought #446 is only for total_results values etc.
پاسخ توسط drab
در تاریخ فوریه 14, 2015 ساعت 9:59 ق.ض
Hi, I see that ticked #446 has been resolved but there is still something weird going on with timezones.
Right now both in Melbourne and Sydney it is 02:00, Sunday. I try to query /airing_today for both of those timezones and I am getting different results - Melbourne is fine and Sydney is not (still gives results from Saturday)
پاسخ توسط Travis Bell
در تاریخ فوریه 14, 2015 ساعت 10:16 ق.ض
Hi drab,
While the ticket is complete, I haven't pushed it to production yet. I have a few more tickets to wrap up and I'll be doing a deploy next week sometime.
پاسخ توسط drab
در تاریخ فوریه 15, 2015 ساعت 2:04 ب.ض
I see. Thanks for reply and your work Travis.
پاسخ توسط Travis Bell
در تاریخ فوریه 19, 2015 ساعت 10:19 ق.ض
Hi drab,
This was just pushed out. You'll see there's now only a 5 minute cache on the
/airing_today
method now. So while it is still possible you could see a cached response from before "midnight", it will clear out very quickly and return the expected results.P.S. there could still be a potential issue when dealing with daylight savings. I'm honestly not clear on how I handle that at the moment.
Cheers.
پاسخ توسط drab
در تاریخ فوریه 25, 2015 ساعت 2:23 ق.ض
It seems to be working as intended! I'm not sure about daylight saving, guess we will find out when it happens.