[Need Help] php timing issues


Posted on 16th Feb 2014 07:03 pm 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
Did you know?Explore Trending and Topic pages for more stories like this.
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";
}
?>
No comments posted yet

Your Answer:

Login to answer
178 Like 39 Dislike
Previous forums Next forums
Other forums

UPLOAD IMAGES NOT WORKING!
Hi there i have a upload script in which it uploads the picture to a folder than creates two thumbna

Why is this query failing?
Why is this not working?
$query = "SELECT * FROM `users` WHERE `userid` = " . $USERID

Troubles with a spider class
I am building a spider that will crawl through random whitepages (eg. anywho.com, switchboard.com, w

php slowing my site?
Hi all,

I think that one of the reasons that my site doesn't work fast is that the code is ve

getting rid of quotes in strings
sick of trying to deal with them in multiple ways (entering in and taking from database, echoing, ec

cstdatomic (c++0x std::atomic) / g++ 4.4
Hello,

I'm trying to use cstdatomic (std::atomic in the upcoming c++0x standard) in g++

Need help with PHP/MySQL drop down menu
I need help on how I can implement a drop down menu which queries mysql database and output the avai

Get value from Select menu
Hi!

Have tried to find the solution on the web. Don't know if there is an easy one. A descrip

Allowing ' and "
Hello everyone,

I am creating a form where users submit information to go into a database. I

Sort a two dimensional array.
Hi. I've set up a two dimensional array that reads as follows:

Code: $modifiedData = array(

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash