Jump to content

compare unix timestamps


aliento

Recommended Posts

I want to know if a Unix timestamp have passed current time.

if($current_ts<=$old_ts) echo 'it have passed';

Does it works like this?

 

Yes, It may work like this as they are just simply incrementing numbers.

$time = time();
$check = "1234567890";
if ($time >= $check) { 
   echo "Time has passed $check";
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.