Page 1 of 1

time validation

Posted: Fri Apr 14, 2006 6:59 am
by lucashii
I want to validate the current time with the time store in my db which is $timea.I currently got the code to work but i wish to change the format to 24 hr time format.Is that possible?any help would be appreciated~~thanks~~

$oldTime = strtotime("today $timea");
$nowTime = mktime();

Posted: Fri Apr 14, 2006 7:41 am
by feyd
The time is in seconds from the epoch. You can run it through date() to find out the time in almost any format you wish.