original_string: public function unixTimestamp( $column )
      {
          $column = $this->getIdentifier( $column );
  
          if ( $column != 'NOW()' )
          {
              $column = "CAST( {$column} AS TIMESTAMP )";
  //            // alternative
  //            if ( preg_match( '/[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}/', $column ) ) {
  //                $column = "TO_TIMESTAMP( {$column}, 'YYYY-MM-DD HH24:MI:SS' )";
  //            }
          }
  
          $date1 = "CAST( SYS_EXTRACT_UTC( {$column} ) AS DATE )";
          $date2 = "TO_DATE( '19700101000000', 'YYYYMMDDHH24MISS' )";
          return " ROUND( ( {$date1} - {$date2} ) / ( 1 / 86400 ) ) ";
      }
code: public function unixTimestamp( $column )
      {
          $column = $this->getIdentifier( $column );
  
          if ( $column != 'NOW()' )
          {
              $column = "CAST( {$column} AS TIMESTAMP )";
  //            // alternative
  //            if ( preg_match( '/[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}/', $column ) ) {
  //                $column = "TO_TIMESTAMP( {$column}, 'YYYY-MM-DD HH24:MI:SS' )";
  //            }
          }
  
          $date1 = "CAST( SYS_EXTRACT_UTC( {$column} ) AS DATE )";
          $date2 = "TO_DATE( '19700101000000', 'YYYYMMDDHH24MISS' )";
          return " ROUND( ( {$date1} - {$date2} ) / ( 1 / 86400 ) ) ";
      }
code_tokens: public function unixTimestamp ( $ column ) { $ column = $ this -> getIdentifier ( $ column ) ; if ( $ column != 'NOW()' ) { $ column = "CAST( {$column} AS TIMESTAMP )" ; //            // alternative //            if ( preg_match( '/[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}/', $column ) ) { //                $column = "TO_TIMESTAMP( {$column}, 'YYYY-MM-DD HH24:MI:SS' )"; //            } } $ date1 = "CAST( SYS_EXTRACT_UTC( {$column} ) AS DATE )" ; $ date2 = "TO_DATE( '19700101000000', 'YYYYMMDDHH24MISS' )" ; return " ROUND( ( {$date1} - {$date2} ) / ( 1 / 86400 ) ) " ; }
docstring: Returns the SQL that converts a timestamp value to a unix timestamp.
  
  @param string $column
  @return string
docstring_tokens: Returns the SQL that converts a timestamp value to a unix timestamp .