title: Create datetime object of other timezone in Powershell
body: <p>Basically I am trying to find a way to convert datetime of a particular timezone to other timezone while taking DST into consideration too.  e.g.</p>
  
  <p><em><strong>What is the time in "Central Pacific Standard Time" when it is, say, 2012/9/29 9:00AM in "Tokyo Standard Time" ?</em></strong></p>
  
  <p>I found some solutions on the Internet to convert local machine time to other timezone.</p>
  
  <pre><code>$ToTimeZoneObj = [system.timezoneinfo]::GetSystemTimeZones() | Where-Object {$_.id -eq $ToTimeZone}
  $TargetZoneTime = [system.timezoneinfo]::ConvertTime($datetime, $ToTimeZoneObj)
  </code></pre>
  
  <p>I am thinking if I can create a datetime object of a timezone different from the local machine, I can then use the solutions I found, or will there be other ways to do what I need?</p>
  
  <p>Thanks</p>