docs: def parse_timestr(timestr):
      """
      Parse a string describing a point in time.
      """
      timedelta_secs = parse_timedelta(timestr)
      sync_start = datetime.now()
  
      if timedelta_secs:
          target = datetime.now() + timedelta(seconds=timedelta_secs)
      elif timestr.isdigit():
          target = datetime.now() + timedelta(seconds=int(timestr))
      else:
          try:
              target = parse(timestr)
          except:
              # unfortunately, dateutil doesn't raise the best exceptions
              raise ValueError("Unable to parse '{}'".format(timestr))
  
          # When I do "termdown 10" (the two cases above), I want a
          # countdown for the next 10 seconds. Okay. But when I do
          # "termdown 23:52", I want a countdown that ends at that exact
          # moment -- the countdown is related to real time. Thus, I want
          # my frames to be drawn at full seconds, so I enforce
          # microsecond=0.
          sync_start = sync_start.replace(microsecond=0)
      try:
          # try to convert target to naive local timezone
          target = target.astimezone(tz=tz.tzlocal()).replace(tzinfo=None)
      except ValueError:
          # parse() already returned a naive datetime, all is well
          pass
      return (sync_start, target)