How to turn Y-m-d to Unix timestamp at midnight in PHP?

-1

Good afternoon,

I need to convert the data from a form that comes in the form ex: 2018-02-13 to UNIX at midnight. If I convert normally using strtotime it comes right but with the time at 6:00 AM.

Can anyone give a light? Thanks =)

    
asked by anonymous 13.02.2018 / 17:46

1 answer

0

Solved, $ check_in = strtotime ('- 6 hour', strtotime ($ arrival));

    
13.02.2018 / 18:11