Claes100 - 9:26 am on Jun 20, 2013 (gmt 0)
I would like to show the time remaining for different online tests but I receive a 1 hour difference (1 more) from the correct value. Can it be a DST problem or something I completely missed...?
$startTime = "2013-06-20 10:00:00"; // received from MySql
$timeLim = 4; // hours to complete test
$secondsLeft = strtotime($startTime) + $timeLim*60*60 - time();
$timeLeft = date("H:i:s", $secondsLeft);
The above gives me for example 03:20:10 left to complete the test, but the actual should be 02:20:10...
Any comment much appreciated.
/Claes, Stockholm, Sweden