Hi there,
I've got kind of a tricky question, I already searched every related question on Stackoverflow and neither solved my conundrum, although I think I'm running in circles, so here's the question:
I've got this code:
$val = (strtotime('2010-03-22 10:05:00')-strtotime('2010-03-22 09:00:00'))
This returns correctly $val = 3900 (3600 seconds = 1 hour, 300 seconds = 5 mins)
But doing this:
echo date("H:i",$val)."<br>";
returns 02:05
even doing this:
echo date("H:i",3900)."<br>";
returns 02:05 (just to be naively sure)
Doing this:
echo date("H:i eTO",3900)."<br>";
returns
02:05 System/LocaltimeCET+0100
Which is correct, my timezone is CET and is +1.
What's going on? Is date() correcting the timezone for some reason? Or am I doing anything wrong?