I've a date in the format dd/mm/YYYY. Eg: 25/06/2015. I want convert it to timestamp. I've added the following code to implement this;
$timestamp = strtotime( str_replace( '/', '-', '25/06/2015' ) );
It creates timestamp, but when I convert that timestamp I can see that it is one day before. When I execute the above code, I got the timestamp value "1435183200". When I convert this I got the previous date "24/06/2015".
If anybody knows the solution to fix this, please help.
I think you have the default timezone configured in PHP. Try switching your timezone. Use:
For a list of supported timezones, go to http://php.net/manual/en/timezones.php