I find the error why not with me in the ON AIR TODAY LIST the time is displayed correctly and in the weeks preview the time is shifted by one hour backwards.
Hey guys, I'm in the process of fixing a lot of timezone error bugs for 2.5.1. I was noticing how widgets data is returned while doing this and had a question for you guys.
Would you be interested in having Airtime return data in UTC time from the server for the widgets, and then javascript will convert the times to be in the timezone of the user's browser? (Which would be their local time pretty much, it wouldn't just show the items in the station's local time only).
In summary would you rather have the javascript widget display items according to the station's set time or to the local time of the user viewing the widget?
I already do exactly that. So I vote YES! I pass the listener's timezone as a hidden field on my 'Listen Now' Button And return more metadata - which is very useful for my display See here http://www.deprogrammedradio.com/
BE CAREFULL. Simple website caching could ruin it by returning the previous values from someone else in another timezone!
Post edited by John Chewter at 2013-12-06 12:59:00
Did you currently change Airtime's server data to return times in UTC rather than in the server's time? I would change it so that anything is always returned in UTC no matter what the radio's timezone is set to. This should avoid any caching problems since it'll always be the same data that is fetched.
Then these times can be converted on the client using something such as
Thats exactly how I do it for whats-on-now widget. For weekly schedule I am sending up the local time zone and rewrote the code on airtime to return the weeks schedule in local time. It does not suffer caching issues.
I did have a caching problem in my station player which could explain some of the 'wrong track playing' and similar issues posted. I will write a 'tip' post for the airtime hacks. I think this should be put in the airtime backend player too as I saw similar behaviour there. Its a very simple fix.