Nag
Nag

Reputation: 13

Check if a time in a timezone is elapsed in php?

Here's the time entered by a user CDT 2011-02-01 16:30:00

How do i know that if that time was passed already in php?

Thanks

Upvotes: 1

Views: 99

Answers (1)

cusimar9
cusimar9

Reputation: 5259

$usertime = strtotime('CDT 2011-02-01 16:30:00');
if (time() > $usertime) echo 'time passed';

Upvotes: 2

Related Questions