netmix / radio-station

Radio Station WordPress Plugin (Open Source)
https://netmix.com
GNU General Public License v3.0
19 stars 14 forks source link

[ API ] Displaying incorrect time for the current_show #486

Closed bmgage1993 closed 3 months ago

bmgage1993 commented 4 months ago

Describe the bug I am developing a mobile app for my radio station that uses this plugin's API. When I navigate to the API /wp-json/radio/station, it displays current_show and it is the correct show, but the start and end time are incorrect. However, further down in the json, the schedule is correct.

Screenshots

image image
ollydowning commented 4 months ago

+1 for this, also seeing current_show and next_show returning the same values.

tonyzeoli commented 4 months ago

@bmgage1993 @ollydowning Thanks for reporting this.

First, @bmgage1993 , awesome that you're building a mobile app from our API. I'd love to interview you for our blog after you finish it so we can feature what's possible with the API. Hopefully, we'll get to a pull API in the future so that it's a two way street.

@ollydowning Thanks for chiming in.

@majick777 will take a look at this and push a fix as a dev release candidate for you to take and see if his fix solve the issue.

majick777 commented 3 months ago

@bmgage1993 @ollydowning I've just added a patch for this, seems I was overzealous in using a time conversion function in 2.5.6 and it was double-converting the timezones in the broadcast data, making the current_show/next_show times wrong.

Check out the latest via develop branch (or 2.5.9 release): https://github.com/netmix/radio-station/tree/develop https://github.com/netmix/radio-station/releases/tag/2.5.9

tonyzeoli commented 3 months ago

@bmgage1993 A patch has been issued by @majick777 for this issue. Closing this ticket.