title: How to calculate the local datetime from a utc datetime in tsql (sql 2005)?
body: <p>i want to loop over a period of time in tsql, and print the utc datetimes and our local variant.
  We live in UTC +1, so i could easily add 1 hour, but in the summertime we live in UTC +2.</p>
  
  <p>In C# i can create  a datetime and use a method to ask for the UTC variant and vice versa.</p>
  
  <p>Till now i have this:</p>
  
  <pre><code>declare @counter int
  declare @localdate datetime
  declare @utcdate datetime
   set @counter = 0
   while @counter &lt; 100
   begin
     set @counter = @counter + 1
     print 'The counter is ' + cast(@counter as char)
    set @utcdate  = DATEADD(day,@counter,GETUTCDATE())
    --set @localdate = ????
  
    print  @localdate  
    print @utcdate
   end
  </code></pre>