I'm trying to convert 1540621628
value which is coming from Database date_created
field. I want this to be converted to proper date.
What i tried:
date("m/d/Y H:i:s", strtotime($symptom[ 'date_created' ]));
But it's printing 12/31/1969 19:00:00 which isn't valid value because i converted the 1540621628
in https://www.epochconverter.com/ and it gives proper date i.e
GMT: Saturday, October 27, 2018 7:06:34.154 AM Your time zone: Saturday, October 27, 2018 12:06:34.154 PM GMT+05:00