widget problem
  • Hello,

    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.

    Here is the link to my widget site http://www.vps9519.alfahosting-vps.de/widget/x_widget.html

    would be nice if someone could help me. thanks
  • 7 Comments sorted by
  • 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?
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    Hi,

    your airtime server have it the good hour ?
    your web server is it on the same ?

    version of Airtime ?


  • 4 places to check Time and Timezones on server:
    • Airtime Server Hardware Clock & Time Zone
    • Time Zone in PHP.INI - Some systems may change this to follow system hardware clock - some not
    • Airtime Admin Timezone - In Admin Link from right hand of menu bar.
    • Airtime Backend User Preferences - In Preferences Menu
    My supernatural powers tell me this will be improved in the 2.51 space-time continuum.
    Post edited by John Chewter at 2013-12-06 04:38:21
    No longer using Airtime or Libretime.
  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator

    My supernatural powers tell me this will be improved in the 2.51 space-time continuum.



    :-D
    Official Airtime Forum Manager
    --------------------------
    Most of the time an issue is located between keyboard and chair.
  • 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
    No longer using Airtime or Libretime.
  • 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.
    No longer using Airtime or Libretime.