Uploaded image for project: 'Request For Comments'
  1. Request For Comments
  2. RFC-219

Add support to daf::base::DateTime for TAI strings


    • Type: RFC
    • Status: Implemented
    • Resolution: Done
    • Component/s: DM
    • Labels:


      The current lsst::daf::base::DateTime can only read and write ISO8601 strings as UTC. This means it cannot easily be used to read or write FITS header dates, which have the following requirements:

      • TAI dates are supported, by setting TIMESYS=TAI (very useful, since TAI is a uniform time system, so it makes a logical choice for recording dates)
      • FITS ISO8601 dates cannot contain a "Z" (or other time zone character)

      I propose the following modifications:

      • DateTime(std::string const& iso8601) gain a time system argument that defaults to UTC. This is necessary in order to easily and correctly read valid FITS dates, e.g. for massaging raw data into our format.
      • DateTime.toString() gains two arguments:
        • a time system argument that defaults to UTC. This allows us to easily write TAI dates to our FITS files, which is a clear win.
        • a flag that controls whether to output the "Z". This saves the trouble of stripping that character manually, increasing the chances that programmers will write correct FITS dates. However, we can live without it if necessary.

      If accepted, I would like to implement this as part of DM-5503. If rejected then I suggest the following:

      • Always write dates as MJD TAI and never as ISO8601. This has two minor concerns:
        • MJD potentially loses some digits
        • ISO dates have some human readability advantages (though MJD is also nice for other reasons, which is probably why both are often written)
      • Do not support reading raw dates whose dates are ISO8601 TAI. I do not know if this will be a problem for any cameras that we presently support; in many cases dates are written as both MJD and ISO8601, giving us an alternative for reading, and of course many cameras write UTC dates.


          Issue Links


            rowen Russell Owen created issue -
            rowen Russell Owen made changes -
            Field Original Value New Value
            Link This issue relates to DM-5503 [ DM-5503 ]
            rowen Russell Owen made changes -
            Resolution Done [ 10000 ]
            Status Proposed [ 10805 ] Adopted [ 10806 ]
            rowen Russell Owen made changes -
            Link This issue is triggering DM-7587 [ DM-7587 ]
            rowen Russell Owen made changes -
            Status Adopted [ 10806 ] Implemented [ 11105 ]


              • Assignee:
                rowen Russell Owen
                rowen Russell Owen
                John Parejko, Kian-Tat Lim, Pim Schellart [X] (Inactive), Robert Lupton, Russell Owen, Tim Jenness
              • Votes:
                0 Vote for this issue
                6 Start watching this issue


                • Created:
                  Planned End:

                  Summary Panel