code: def datetime2literal_rnc(d: datetime.datetime, c: Optional[Dict]) -> str:
      
      # dt = d.strftime("%Y-%m-%d %H:%M:%S")
      # ... can fail with e.g.
      #   ValueError: year=1850 is before 1900; the datetime strftime() methods
      #   require year >= 1900
      # http://stackoverflow.com/questions/10263956
      dt = d.isoformat(" ")
      # noinspection PyArgumentList
      return _mysql.string_literal(dt, c)
docs: Format a DateTime object as something MySQL will actually accept.