For example: I am setting up a WORLDWIDE station so I want the frontend weekly schedule (widget) to be correct in local time for the users. This saves everybody adding 7, 9 or -8 hours etc. to the displayed schedule.
OK, I was assuming you meant something like this. Thanks for clarifying. I will just take a look into how the information is retrieved/dealt with in our widgets. Are you running your own setup of Airtime or on SaaS?
Yeah I've never liked that about the widget, I was thinking more of allowing how many previous/future days you want shown with a default of today only or something. I think I might rewrite this widget sometime in the future as it could definitely be done better.
This is the key new code on the weekly For Loop. This goes just below for (var j=0; j<daySchedule.length; j++){
var jStartT = daySchedule[j].start_timestamp+' UTC'; var jNewStartDate=jStartT.replace(/-/gi,"/"); var jLocalStartTime = new Date(jNewStartDate); var jLocalSchedStart = ('0' + jLocalStartTime.getHours()).slice(-2)+':'+('0' + jLocalStartTime.getMinutes()).slice(-2); var jEndT = daySchedule[j].end_timestamp+' UTC'; var jNewEndDate=jEndT.replace(/-/gi,"/"); var jLocalEndTime = new Date(jNewEndDate); var jLocalSchedEnd = ('0' + jLocalEndTime.getHours()).slice(-2)+':'+('0' + jLocalEndTime.getMinutes()).slice(-2); .. .. and the the table display to display the local time: