This has always bugged me in Pan-STARRS and ATLAS, and now the issue has come up in LSST.
This topic was raised on the Community Forum. The midpointMjdTai value is in atomic time (TAI). This differs from UTC by (currently) 37 leap seconds. Which means we need to subtract 37 seconds from the mjdnow() result.
For historic observations (e.g. in ZTF) this is more complicated, since we have to check the year before doing the subtraction. But if ZTF derive MJD from UTC, then it's irrelevant.
See https://community.lsst.org/t/question-about-midpointmjdtai-to-utc-conversion-in-recent-rubin-alerts/11976
This has always bugged me in Pan-STARRS and ATLAS, and now the issue has come up in LSST.
This topic was raised on the Community Forum. The
midpointMjdTaivalue is in atomic time (TAI). This differs from UTC by (currently) 37 leap seconds. Which means we need to subtract 37 seconds from themjdnow()result.For historic observations (e.g. in ZTF) this is more complicated, since we have to check the year before doing the subtraction. But if ZTF derive MJD from UTC, then it's irrelevant.
See https://community.lsst.org/t/question-about-midpointmjdtai-to-utc-conversion-in-recent-rubin-alerts/11976