code: public static function getDateTime($format, $timestamp = 'now')
      {
          $date = strtotime($timestamp);
          if (!$date) {
              return $timestamp;
          }
          return date($format, $date);
      }
docs: Get's the datetime in the specified format
  @author Adegoke Obasa <goke@cottacush.com>
  @param $format
  @param null|string $timestamp
  @return bool|string