Return to Snippet

Revision: 67075
at August 6, 2014 21:08 by dmkim


Initial Code
//   Thu, 27 Dec 2012 13:35:18 +0000
           
           //   2012-12-27 13:35:18
           
           $ver = phpversion();
       $ver = explode('.',$ver);
       $ver = implode(array_slice($ver,0,2));
 
       if ($ver>=53) {
           
         $date =  DateTime::createFromFormat('D, d M Y H:i:s O',$s);
         $s = $date->format('Y-m-d H:i:s',$tm);
                 
       } else {
          $tm = strtotime($s);   
                  $s = date('Y-m-d H:i:s',$tm);
       }
           
           return $s;
        }

Initial URL

                                

Initial Description
Convert date from RSS to mySQL format

Initial Title
Convert date from RSS to mySQL format

Initial Tags

                                

Initial Language
PHP