Example #1
0
 /**
  * This method extracs a YYYYmmddhhmmss in localtime timestamp
  */
 public static function obtain_timestamp($time)
 {
     list($y, $m, $d, $h, $mi, $s) = DateTime::format_timedata($time);
     if (checkdate($m, $d, $y) && ($h >= 0 && $h < 24) && ($mi >= 0 && $mi < 60) && ($s >= 0 && $s < 60)) {
         return mktime($h, $mi, $s, $m, $d, $y);
     } else {
         return false;
     }
 }