from datetime import datetime


def _truncate_iso_date(dstr: str) -> datetime:
    """
    Remove the decimal points 'manually' and then parse using fromisoformat
    2020-12-25T07:44:14.32152639-08:00 -> 2020-12-25T07:44:14-08:00 -> fromisoformat -> datetime obj
    """
    buf = ""
    incl = True
    for c in dstr:
        if c == ".":
            incl = False
        if c == "-":
            incl = True
        if incl:
            buf += c
    return datetime.fromisoformat(buf)