[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
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

replacements
I have a variable in my PHP script like

ASSFDDDDDDDDDDDDDASDDDDDDDDARYTRHKKHHHHHHHHHHH and p

Get dump of MySQL DB from Live Site
I'm after an easy, but secure way of generating and importing a MySQL dump from a remote server.

Selecting an "empty" date formated field
How do you select an "empty" date field? I've tried the few ways I can think.
SQL> select

first id from db not showing
I have a php script which displays the content of a mysql table as a html table with sorting, delete

Change Sort Order to Display Newest File First
Hi Guys,

I have a page that sorts the contents (PDFs) of a directory and displays them on the

Displaying an image using echo command
I had done a query on my database, one of the fields being an image reference to a directory where a

search function
HI guys,

if anyone could point us in the right direction of how to do this, or provide some t

There was a problem with the request. (Code: 0)
Any Idea what could cause this? I get it randomly at best. But with both IE and FF. It derives from

PHP form help required
Hi all! Apologies in advance for having to message the forum for help. I know you must get a lot of

Problems with returning true or false in eval()'d code
Hi guys,

Would appreciate some help with a problem when running eval() on a function that sho

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