Skip to content

mjdnow() function produces incorrect UTC result (ignores leap seconds) #549

Description

@genghisken

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions