Hi - I would like to convert a timestamp integer to a localtime string. If the input was a timestamp string (rather than an integer), I could use the datetime object as noted below.
// set object
$date = new DateTime($utc_timestamp, new DateTimeZone($utc_timezone));
// change to local timezone and create output
$localtimestamp = $date->format('Y-m-d H:i:s');
I am sure that there is a simple solution that I am unaware of, I look forward to your insights, thanks!
Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>