PDA

View Full Version : Schedule that works out time zone and displays correct times - is this possible?



peteyt
28-04-2010, 08:53 PM
I've been running my online station for a while now, and relaunched it a few months but due to technical problems we have had to temporary stop broadcasting while we sort our schedule out and get an auto system in place so that when no one turns up we always have music playing.

What I'm interested in is having a schedule that is able to detect the users time zone, and then display for them the shows on the schedule in their correct time. Because we have a few presenters and listeners from other countries a lot of them ask me when certain shows are on their time. It would be nice to have something so they didn't have to ask, and could just see.

I'm using phbb3 for my forum. I was wondering if you could use the forum and the user accounts time zone information?

LMS16
29-04-2010, 08:33 PM
Maybe if u made your script connect to the forum db and fetch the users timezone from the database and then coded it into the script...


<?php
include_once("/form/includes/config.php");
$tz = mysql_fetch_object(mysql_query("SELECT * FROM `users`"));

if($tz->timezone == "GMT"){
// gmt timetable here...
}elseif($tz->timezone == "PST"){
// pst timezone here...
}

?>


Thats just basic...

Lew.

Want to hide these adverts? Register an account for free!