'Convert datetime object contained in val1 to jd1, jd2'

def set_jds(self, val1, val2):

    iterator = np.nditer([val1, None, None, None, None, None, None], flags=[u'refs_ok'], op_dtypes=(([np.object] + (5 * [np.intc])) + [np.double]))
    for (val, iy, im, id, ihr, imin, dsec) in iterator:
        dt = val.item()
        if (dt.tzinfo is not None):
            dt = (dt - dt.utcoffset()).replace(tzinfo=None)
        iy[...] = dt.year
        im[...] = dt.month
        id[...] = dt.day
        ihr[...] = dt.hour
        imin[...] = dt.minute
        dsec[...] = (dt.second + (dt.microsecond / 1000000.0))
    (self.jd1, self.jd2) = erfa.dtf2d(self.scale.upper().encode(u'ascii'), *iterator.operands[1:])
