def _buildTime(self, source, quantity, modifier, units):
ctx = self.currentContext<EOL>debug and log.debug('<STR_LIT>',<EOL>quantity, modifier, units)<EOL>if source is None:<EOL><INDENT>source = time.localtime()<EOL><DEDENT>if quantity is None:<EOL><INDENT>quantity = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>quantity = quantity.strip()<EOL><DEDENT>qty = self._quantityToReal(quantity)<EOL>if modifier in self.ptc.Modifiers:<EOL><INDENT>qty = qty * self.ptc.Modifiers[modifier]<EOL>if units is None or units == '<STR_LIT>':<EOL><INDENT>units = '<STR_LIT>'<EOL><DEDENT><DEDENT>(yr, mth, dy, hr, mn, sec, _, _, _) = source<EOL>start = datetime.datetime(yr, mth, dy, hr, mn, sec)<EOL>target = start<EOL>realunit = units<EOL>for key, values in self.ptc.units.items():<EOL><INDENT>if units in values:<EOL><INDENT>realunit = key<EOL>break<EOL><DEDENT><DEDENT>debug and log.debug('<STR_LIT>',<EOL>units, realunit, qty)<EOL>try:<EOL><INDENT>if realunit in ('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>target = self.inc(start, **{realunit[:-<NUM_LIT:1>]: qty})<EOL><DEDENT>elif realunit in ('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>delta = datetime.timedelta(**{realunit: qty})<EOL>target = start + delta<EOL><DEDENT><DEDENT>except OverflowError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>ctx.updateAccuracy(realunit)<EOL><DEDENT>return target.timetuple()<EOL>
Take C{quantity}, C{modifier} and C{unit} strings and convert them
into values. After converting, calcuate the time and return the
adjusted sourceTime.

@type  source:   time
@param source:   time to use as the base (or source)
@type  quantity: string
@param quantity: quantity string
@type  modifier: string
@param modifier: how quantity and units modify the source time
@type  units:    string
@param units:    unit of the quantity (i.e. hours, days, months, etc)

@rtype:  struct_time
@return: C{struct_time} of the calculated time