OpenSprinkler Forums OpenSprinkler Mobile and Web App Mobile Web App with Screenshots (Updated) Re: Re: Mobile Web App for OpenSprinkler (w/Screenshots)

#23943

Samer
Keymaster

Now I suspect the time is off on the server running the PHP code. Can you run commands from the terminal? If so run the following:

date

If not make a file named test.php that contains the following and open it:


echo date(DATE_RSS)."n
";
date_default_timezone_set('UTC');
echo date(DATE_RSS);
?>

Just so I can try and understand the server’s situation. You could also do both in case they are different, etc.

The reason I suspect the time is off is because if your PHP is being told to use UTC time and is saving as 13:51 when in fact the UTC time now is 5:09 something is wrong.

Edit: Sorry this is taking a bit to work out, I am new to truly understanding timezones in programming and really only have my two computers which are both in central to experiment with. With that said they work fine which is what’s making it hard to grasp the problem. Thanks!

Edit 2: Using the OSPi code I just ran a run-once program and this is what I see:

01000000--2013-06-19 05:22:01

My web app displays:

Wed, 6/19/2013 12:22 AM Running Now

The interval program has a timezone set of -05:00 (central time but adjusted for daylights saving time)