original_string: public function setTimeZoneId($timeZoneId)
      {
          if (null === $timeZoneId) {
              $timeZoneId = date_default_timezone_get();
  
              $this->uninitializedTimeZoneId = true;
          }
  
          // Backup original passed time zone
          $timeZone = $timeZoneId;
  
          // Get an Etc/GMT time zone that is accepted for \DateTimeZone
          if ('GMT' !== $timeZoneId && 0 === strpos($timeZoneId, 'GMT')) {
              try {
                  $timeZoneId = DateFormat\TimezoneTransformer::getEtcTimeZoneId($timeZoneId);
              } catch (\InvalidArgumentException $e) {
                  // Does nothing, will fallback to UTC
              }
          }
  
          try {
              $this->dateTimeZone = new \DateTimeZone($timeZoneId);
              if ('GMT' !== $timeZoneId && $this->dateTimeZone->getName() !== $timeZoneId) {
                  $timeZone = $this->getTimeZoneId();
              }
          } catch (\Exception $e) {
              $timeZoneId = $timeZone = $this->getTimeZoneId();
              $this->dateTimeZone = new \DateTimeZone($timeZoneId);
          }
  
          $this->timeZoneId = $timeZone;
  
          return true;
      }
code: public function setTimeZoneId($timeZoneId)
      {
          if (null === $timeZoneId) {
              $timeZoneId = date_default_timezone_get();
  
              $this->uninitializedTimeZoneId = true;
          }
  
          // Backup original passed time zone
          $timeZone = $timeZoneId;
  
          // Get an Etc/GMT time zone that is accepted for \DateTimeZone
          if ('GMT' !== $timeZoneId && 0 === strpos($timeZoneId, 'GMT')) {
              try {
                  $timeZoneId = DateFormat\TimezoneTransformer::getEtcTimeZoneId($timeZoneId);
              } catch (\InvalidArgumentException $e) {
                  // Does nothing, will fallback to UTC
              }
          }
  
          try {
              $this->dateTimeZone = new \DateTimeZone($timeZoneId);
              if ('GMT' !== $timeZoneId && $this->dateTimeZone->getName() !== $timeZoneId) {
                  $timeZone = $this->getTimeZoneId();
              }
          } catch (\Exception $e) {
              $timeZoneId = $timeZone = $this->getTimeZoneId();
              $this->dateTimeZone = new \DateTimeZone($timeZoneId);
          }
  
          $this->timeZoneId = $timeZone;
  
          return true;
      }
code_tokens: public function setTimeZoneId ( $ timeZoneId ) { if ( null === $ timeZoneId ) { $ timeZoneId = date_default_timezone_get ( ) ; $ this -> uninitializedTimeZoneId = true ; } // Backup original passed time zone $ timeZone = $ timeZoneId ; // Get an Etc/GMT time zone that is accepted for \DateTimeZone if ( 'GMT' !== $ timeZoneId && 0 === strpos ( $ timeZoneId , 'GMT' ) ) { try { $ timeZoneId = DateFormat \ TimezoneTransformer :: getEtcTimeZoneId ( $ timeZoneId ) ; } catch ( \ InvalidArgumentException $ e ) { // Does nothing, will fallback to UTC } } try { $ this -> dateTimeZone = new \ DateTimeZone ( $ timeZoneId ) ; if ( 'GMT' !== $ timeZoneId && $ this -> dateTimeZone -> getName ( ) !== $ timeZoneId ) { $ timeZone = $ this -> getTimeZoneId ( ) ; } } catch ( \ Exception $ e ) { $ timeZoneId = $ timeZone = $ this -> getTimeZoneId ( ) ; $ this -> dateTimeZone = new \ DateTimeZone ( $ timeZoneId ) ; } $ this -> timeZoneId = $ timeZone ; return true ; }
docstring: Set the formatter's timezone identifier.
  
  @param string|null $timeZoneId The time zone ID string of the time zone to use.
  If NULL or the empty string, the default time zone for the
  runtime is used.
  
  @return bool true on success or false on failure
  
  @see http://www.php.net/manual/en/intldateformatter.settimezoneid.php
docstring_tokens: Set the formatter s timezone identifier .