Hey, i've got a php script which uses mysql to get the current on air presenter for a website for a new community radio station website that im working on.
It has been working great until we moved to a server with a US Timezone.
Is there any way to offset the curtime() funtion by +6 hours?
My script code:
The script is liked up to a database with 7 tables (Mon, Tue, Wed, Thu, etc) and checks for the time from the showbegin and showend columns (data type set at time)PHP Code:<?php
$day = date('D');
$result = mysql_query("SELECT * FROM `$day` WHERE showbegin < curtime() AND showend > curtime()");
if(!$result){
echo "There has been an error in retrieving the current presenter. ";
} else {
$showInfo = mysql_fetch_assoc($result);
?>
<div class="show">
<p>Current Presenter: <?php echo $showInfo['presenter'] ?></p>
<?php } ?>
Thanks in advance
Curtis





Reply With Quote





