Convert Unixtime To Mysql Datetime

Last modified: 
Friday, May 1st, 2015

Convert Unix Timestamp to Mysql Datetime Format in PHP

function time2datetime($timestamp){
  return gmdate("Y-m-d H:i:s", $timestamp);

The operator of this site makes no claims, promises, or guarantees of the accuracy, completeness, originality, uniqueness, or even general adequacy of the contents herein and expressly disclaims liability for errors and omissions in the contents of this website.