import datetime as dt


def updateDatetime(year, doy):
    """
    creates datetimes for updating NMHC info
    :param year: the year
    :param doy: the decimal day of year
    :return: datetime
    """

    start = dt.datetime(year - 1, 12, 31)  # create starting datetime
    result = start + dt.timedelta(days=doy)  # add timedelta of those days

    return result