Quantcast
Viewing all articles
Browse latest Browse all 5530

nourseman on "Wrong times displayed on a MYSQL table integrated into WP page"

I'm calling a separate mysql db that is logging songs we're playing for an online playlist history. I'm calling that db and the information is posting correctly, but the times are displayed in UTC. Would WordPress happen to change the time values to display in UTC despite me adjusting the general settings to display in Pacific Standard Time (PST)?

The PHP I'd been using had previously been on a non-WordPress HTML/PHP site that displayed the correct PST times when called (which is why I'm assuming WordPress is adjusting the times somewhere).

Any insight into why this might be happening, and what a good work around solution would be?

$display=date('l - F j, Y', strtotime($date)).""; $list.="\n";
$list.="\n";list($year, $month, $day) = explode("-", $date);
$begtime = mktime(0, 0, 0, $month , $day, $year);
$endtime = mktime(23, 59, 59, $month , $day, $year);
$SQL="SELECT * FROM music_on_air WHERE xml_file_name BETWEEN '$begtime' AND '$endtime' ORDER BY id DESC ";
$result = mysql_query($SQL) or die("Query Failed : $SQL " . mysql_error());
$count=0;
while($ROW=mysql_fetch_array($result,MYSQL_ASSOC))
{
$id=$ROW['id'];
$xml_file_name=$ROW['xml_file_name'];
$artist_name=$ROW['artist_name'];
$album_name=$ROW['album_name'];
$title=$ROW['title'];
$air_date=date("F j, Y",$xml_file_name);
$air_time=date("g:i a",$xml_file_name);
$air_hr=date('H',$xml_file_name);if(strlen($album_name) > 3)
{

Viewing all articles
Browse latest Browse all 5530

Trending Articles