title: Power Query: Date Time Zone operations
body: <p>I am building Power BI report based on data from SQL Server's table User which contains a column CreatedDate of type DateTypeOffset(7).
  I am looking for Power Query equivalent to .NET [TimeZoneInfo.FindSystemTimeZoneById]. My Report data has a Time Zone info which is stored as standard ID (like <strong>Pacific Standard Time</strong>) and I need to convert values in my DateTimeOffset column to the time zone I was talking about above, this is how I do that in C#:</p>
  
  <pre><code>TimeSpan timeZoneOffsetSpan = TimeZoneInfo.FindSystemTimeZoneById(settings.TimeZ​one).GetUtcOffset(UserCreatedDateTime);
  </code></pre>
  
  <p>This gives me a difference between the time in the time zone stored in my Settings and UTC for UserCreatedDateTime. And I am executing that line of the code just once for all rows in my User table because the purpose of the code above is to find out current offset taking into account such timezone's features like DayLightSaving.</p>
  
  <p>And now I can simply add that offset (which could be positive or negative) against every value in my User.CreateDateTime column, in C# I am doing that by using [DateTimeOffset.ToOffset]:</p>
  
  <pre><code>DateTimeOffset convertedOffset = UserCreatedDateTime.ToOffset(timeZoneOffsetSpan)
  </code></pre>
  
  <p>So I need to be able to do the same conversions in my Power BI report but I couldnot find any Power Query function which can do the same what [TimeZoneInfo.FindSystemTimeZoneById] does, if that function existed it would cover my first line of C# code and then I would need to find an equivalent to [TimeZoneInfo.FindSystemTimeZoneById]. [DateTimeZone.SwitchZone] is probably what I need but I first need to know the offset corresponding to my time zone and then I would be able to supply that offset as 2nd and 3rd parameters to that function.</p>
  
  <p>So, to finalize, I need Power BI analog for [TimeZoneInfo.FindSystemTimeZoneById].
  Can anybody help?</p>