This question already has an answer here:
- Trying to define my own time type in PHP 2 answers
I have had some issues with comparing date/times.
I had a working code that just stopped working all of a sudden. Now I made some changes to it and by some reason UNIX time is not correct.
Utime and nexttime is just an example string now, but in the code Utime is last time updated, and nexttime is next time a update will happen calculated from Utime.
Example:
$Utime = "201603300450"; // YmdHi 2016 03 30 04:50
$nexttime = "201603300520";
if (date("YmdHi")>=$Utime && date("YmdHi")>=$nexttime)
Is this a safe way to compare the timevalue? I had some issues with strtotime thats why I ask.
</div>