title: Different environment between server/localhost is changing the date format - php pdo mysql/oci
body: <p>I'm having problems to configure my server environment, the PHP with PDO is not formatting the date like the localhost.
  To test it, I created two connections (using pdo with oci and mysql).
  On localhost, oci and mysql runs normally, but on server only the mysql maintains the correct format.</p>
  
  <p>IMPORTANT DETAIL: On sqldeveloper, it shows the data in the same format like localhost pdo/oci.</p>
  
  <p>MY LOCALHOST IS WINDOWS 7 AND MY SERVER IS LINUX DEBIAN X64.</p>
  
  <p>What could to be happening with pdo/oci on server?</p>
  
  <p>Code:</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;Documento sem título&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;?php
  try
  {
      $params-&gt;host = "172.0.0.0:1521";
      $params-&gt;dbname = "geo";
      $params-&gt;user = "root";
      $params-&gt;pass = "";
  
      $conn = new PDO("oci:dbname=//$params-&gt;host/$params-&gt;dbname;charset=UTF8", "$params-&gt;user", "$params-&gt;pass");
      $conn-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  
      $stmt = $conn-&gt;prepare("select * from tb_geooficio where tipo = 1 and cadastro_im = 37693500 ");
      $stmt-&gt;execute();
      $result = $stmt-&gt;fetchAll(PDO::FETCH_ASSOC);
      print_r($result);
  }
  catch(Exception $e)
  {
      echo $e-&gt;getMessage();
  }
  ?&gt;
  
  &lt;?php
  try
  {
      $host = "200.0.0.1";
      $user = "postmaster";
      $pass = "^PostM@ster^";
      $db = "bd_controleinternet";
  
      $conn = new PDO("mysql:host=$host; dbname=$db", "$user", "$pass");
      $conn-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  
      $stmt = $conn-&gt;prepare("select * from tbl_secretaria where sec_id = 7");
      $stmt-&gt;execute();
      $result = $stmt-&gt;fetchAll(PDO::FETCH_ASSOC);
      print_r($result);
  }
  catch(Exception $e)
  {
      echo $e-&gt;getMessage();
  }
  ?&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Result:</p>
  
  <p><img src="https://i.stack.imgur.com/orUHD.png" alt="enter image description here"></p>