[Need Help] php timing issues

Posted on 16th Feb 2014 by admin

I don't know what is going wrong. I need some help with being able to set an image at 9:00am Colorado time if my server is in California and it would be 8:00am. I tried to echo the image below, but it's not working.

Code: [Select]<?php
$hours_offset = -1; // Server time offset
function currentImage(){
global $hours_offset;
$hour = date("H",(time()-(3600*$hours_offset)));
$imagePath = "img/";
if (date(H) < 09 || date(H) > 21) {
return $imagePath."".date(D)."/".$hour.".png";
}
?>

Other forums