title: PowerShell Convert SharePoint Online UTC date To Local (or EST) within a Select expression
body: <p>My PowerShell script retrieves file information from a SharePoint Online library and compares to a local repository.  However, it always returns the SPO TimeStamp value in UTC time.  I'd like to convert this to EST in order to compare to onPrem files.</p>
  <pre><code>$Target = @($TargetFiles | Select @{Label='TargetItemURL';Expression={$_.FieldValues.FileRef.Replace($Web.ServerRelativeUrl,&quot;&quot;)}},
                              @{Label='Timestamp';Expression={$_.FieldValues.Modified.ToString(&quot;MM/dd/yyyy hh:mm tt&quot;)}},
                             @{Label='FullName';Expression={$_.FieldValues.FileRef.Replace($TargetFolder.ServerRelativeURL,$SourceFolderPath).Replace(&quot;/&quot;,&quot;\&quot;)}},
                              @{Label='PSIsContainer';Expression={$_.FileSystemObjectType -eq &quot;Folder&quot;}})
  $FilesDifferent = Compare-Object -ReferenceObject $Source -DifferenceObject $Target -Property FullName, Timestamp, TargetItemURL, PSIsContainer 
  
  </code></pre>
  <p>How can I get the Target to contain the timestamp as local or EST?  I've tried creating a separate function call but those don't seem to work since is using the &quot;Select&quot; statement.</p>