title: dynamics crm 2013 c# plugin update/change system user timezone in it's usersettings
body: <p><strong>hello, 
  i need to create a plugin to update a new user -timezone immediately
  after it created, but i don't know how to update the timezone in the connected usersettings - which attributes (like TimeZoneCode) do i must change 
  if i always want to change to time zone to the my country- paris? ,
  and how to update?
  **my steps:</strong></p>
  
  <ol>
  <li>i create a post operation plugin, on systemuser entity - create</li>
  <li>get the id of the new systemuser   // systemUser.systemuserid;  </li>
  <li>retrieve its connected userSettings according to the systemuser id</li>
  </ol>
  
  <p>ColumnSet attributes = new ColumnSet(new string[] { "timezonecode" }); 
   var userSettingsResult =
   _service.Retrieve(userSettings.LogicalName, newSystemUserId, attributes); </p>
  
  <p>**4. but i dont know which attributtes i need to update in usersettings to change the genereal time zone</p>
  
  <p>for example: from london to my country paris ( i always change to paris)</p>
  
  <p>do i only need to change the TimeZoneCode or i need to change more attributes like TimeZoneBias?
  and if so which attributes and  and how?** </p>
  
  <p><strong>my code</strong></p>
  
  <pre><code>public void updateNewUserTimeZone(MOHServiceContext myContext, Entity entity, ITracingService trc, IOrganizationService service, IPluginExecutionContext executionContext)
      {           
          if (entity != null)
          {
             // post operation - the new system user
              var systemUser = entity.ToEntity&lt;systemuser&gt;();
              var newSystemUserId=systemUser.systemuserid;  //get the id of the new systemuser
  
               if (newSystemUserId)
                  {
                      //find the userSettingObject that has the same id as the system user now created
  
                      --var userSettingsResult = (from userSettingObject in myContext.userSettingsSet
                                          --where userSettingObject.systemuserid == newSystemUserId                                            
                                          --select userSettingObject).FirstOrDefault();
  
                  // second way to retrive user setting
                  //the fields we wandt to retrive from usersettings
                      ColumnSet attributes = new ColumnSet(new string[] { "timezonecode" }); 
  
                  // Retrieve the usersettings and its timezonecode attribute.
                  var userSettingsResult = _service.Retrieve(userSettings.LogicalName, newSystemUserId, attributes);                   
  
  
  
  
                      //if we find serSettingObject that has the same id as the system user now created
                      if (userSettingsResult != null)
                      {
                      //how to update the time zone in userSettingsResult we found to paris?
  
                      }
                  }
  
  
              }
  </code></pre>
  
  <p><strong><em>thanks a lot :)
  li</em></strong></p>