[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

PHP Game
hy i was wondering what's the best method in order to make some automatic updates in a php game
<

Replacing a string on click of a button
Hi! Is there a way to replace a string on a click of a text link?

This is what I've come up w

using a loop help
Hi guys , i need some help. I have this loop :
while ($row = mysql_fetch_assoc($Result)) { ?&

problem with php mysql query
Hi guy's...

I'm totally lost here..because don't have any idea how to make a query for grab r

Convert Binary String to Decimal
Trying to Get:
Decimal: 305419896

Out of:
Binary String: xV4

Optimize Code
Just started getting into the use of cookies. The following code will redirect users to a set URL s

Scrolling news bar and MySQL
I am not sure if this is the correct forum to post this on. If not, I apologize. I am still pretty

Need help: how to catch acess of undefined class properties
Hello. I am learning OO with PHP and have hit a problem.
Some code runs as perfectly valid code,

Table control is disappearing from Screen
Hi Experts,

I have a screen with multiple table control(TC). Each table control has two c

Switch letters in message (basic cryptology)...
I am trying to switch letters around in a message for an application on my site (see here). The prob

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