title: Delphi TDateTime variable will not initialize in Delphi 2010
body: <p>I have created a simple form in Delphi 2010 with a single button in the code for the button I put:</p>
  
  <pre><code>procedure TForm1.Button1Click(Sender: TObject);
  var
       myDateTime:TDateTime;
  begin
       myDateTime:=now; // shows as 12/30/99 in debugger
  end;
  </code></pre>
  
  <p>When I run this exact same code in Delphi XE2, I get the current date/time in the value for myDateTime.</p>
  
  <p>I'm thinking I must have something set incorrectly in the Delphi 2010 project environment, but cannot think of what it might be.</p>
  
  <p>Any help would be much appreciated.</p>
  
  <p>Thanks!</p>
  
  <p>Discovered issue, compiler settings were for Code Generation Optimization set to true, and the value apparently gets represented as the default for TDateTime.  When I changed the optimization setting to false, I can see the value.</p>