Jump to content

date / time to timestamp strtotime


astralaaron

Recommended Posts

Do you have any idea why the following will not work? It always results in 16:00 ($_POST is coming from my form which outputs an AM / PM time)

// $_POST['time']   =  "02:32PM";$hour24time = date("H:i", strtotime($_POST['time']));

While this works fine? Results in 14:32

$hour24time = date("H:i", strtotime("02:32PM"));
Edited by astralaaron
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...