original_docstring: Sets the timezone as part of the preprocessing.
  
      Args:
        options: the command line arguments (instance of argparse.Namespace).
        pre_obj: The previously created preprocessing object (instance of
                 PreprocessObject) or None.
      
docstring: Sets the timezone as part of the preprocessing.
docstring_tokens: Sets the timezone as part of the preprocessing .
code: def _PreprocessSetTimezone(self, options, pre_obj):
      """Sets the timezone as part of the preprocessing.
  
      Args:
        options: the command line arguments (instance of argparse.Namespace).
        pre_obj: The previously created preprocessing object (instance of
                 PreprocessObject) or None.
      """
      if hasattr(pre_obj, 'time_zone_str'):
        logging.info(u'Setting timezone to: {0:s}'.format(pre_obj.time_zone_str))
        try:
          pre_obj.zone = pytz.timezone(pre_obj.time_zone_str)
        except pytz.UnknownTimeZoneError:
          if hasattr(options, 'zone'):
            logging.warning((
                u'Unable to automatically configure timezone, falling back '
                u'to the user supplied one: {0:s}').format(self._timezone))
            pre_obj.zone = self._timezone
          else:
            logging.warning(u'TimeZone was not properly set, defaulting to UTC')
            pre_obj.zone = pytz.utc
      else:
        # TODO: shouldn't the user to be able to always override the timezone
        # detection? Or do we need an input sanitation function.
        pre_obj.zone = self._timezone
  
      if not getattr(pre_obj, 'zone', None):
        pre_obj.zone = self._timezone
code_tokens: def _PreprocessSetTimezone ( self , options , pre_obj ) : if hasattr ( pre_obj , 'time_zone_str' ) : logging . info ( u'Setting timezone to: {0:s}' . format ( pre_obj . time_zone_str ) ) try : pre_obj . zone = pytz . timezone ( pre_obj . time_zone_str ) except pytz . UnknownTimeZoneError : if hasattr ( options , 'zone' ) : logging . warning ( ( u'Unable to automatically configure timezone, falling back ' u'to the user supplied one: {0:s}' ) . format ( self . _timezone ) ) pre_obj . zone = self . _timezone else : logging . warning ( u'TimeZone was not properly set, defaulting to UTC' ) pre_obj . zone = pytz . utc else : pre_obj . zone = self . _timezone if not getattr ( pre_obj , 'zone' , None ) : pre_obj . zone = self . _timezone
short_docstring: Sets the timezone as part of the preprocessing.
short_docstring_tokens: Sets the timezone as part of the preprocessing .
comment: """Sets the timezone as part of the preprocessing.
  
      Args:
        options: the command line arguments (instance of argparse.Namespace).
        pre_obj: The previously created preprocessing object (instance of
                 PreprocessObject) or None.
      """$SEP$# TODO: shouldn't the user to be able to always override the timezone$SEP$# detection? Or do we need an input sanitation function.