title: SQL Server 2008 GET DATETIMEOFFSET according to machine settings
body: <p>On SQL Server 2008 R2, I have following T-SQL code:</p>
  
  <pre><code>SELECT CAST(GETDATE() AS DATETIMEOFFSET);
  </code></pre>
  
  <p>This gives me the result as below:</p>
  
  <blockquote>
    <p>2011-12-26 10:21:13.7970000 +00:00</p>
  </blockquote>
  
  <p>But the result is what I wanted to be. It should be this:</p>
  
  <blockquote>
    <p>2011-12-26 10:21:13.7970000 <strong>+02:00</strong></p>
  </blockquote>
  
  <p>Here is my machine's <em>Date and Time Settings</em>:</p>
  
  <p><img src="https://i.stack.imgur.com/PWbXt.png" alt="enter image description here"></p>
  
  <p>The same thing happens while I am inserting a value:</p>
  
  <pre><code>DECLARE @foo AS TABLE(
      fooDate DATETIMEOFFSET
  );
  
  INSERT @foo VALUES(GETDATE());
  
  SELECT * FROM @foo;
  </code></pre>
  
  <p>This gets me the same wrong result (at least wrong for my needs).</p>
  
  <p>What am I missing here?</p>