old_contents: from email import utils as eut
  import calendar
  
  
  def strToUTC(datestr):
      secs = 0
      try:
          timet = eut.parsedate_tz(datestr)
          secs = int(calendar.timegm(timet[:8])) + timet[9]
      except Exception, e:
          import pdb; pdb.set_trace();
      return secs
  
new_contents: from email import utils as eut
  from . import logger, LOG
  import calendar
  
  
  def strToUTC(datestr):
      secs = 0
      try:
          timet = eut.parsedate_tz(datestr)
          secs = int(calendar.timegm(timet[:8])) + timet[9]
      except Exception, e:
          if logger:
              logger.log(type='campaign',
                         severity=LOG.ERROR,
                         msg=repr(e) + str(datestr),
                         fields={})
      return secs
  
subject: add logging to util