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

DateTime() should support invalid dates

    Details

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

      Description

      The default constructor for DateTime produces a date of 1970-01-01 (the unix epoch). I fear that this looks too much like a valid date, and instead propose that the default constructor produce a date at the one end of the acceptable range, specifically 1902-01-01T00:00:00 TAI.

      The main driver for this is that we have a date of exposure as part of our image metadata, and in some cases it is not defined (e.g. master calibration frames that have been generated from individual frames). It would be nice to have an unknown date that was more recognizable as obviously invalid, and not in the middle of the range of valid dates. Note: it is not practical to use NaN for an invalid date, because the internal representation is an integer.

      If this change is accepted quickly I will incorporate it into DM-5503 (unified metadata). Otherwise I may have to postpone it to a new ticket.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rowen Russell Owen
                Reporter:
                rowen Russell Owen
                Watchers:
                Gregory Dubois-Felsmann, Jim Bosch, John Parejko, Kian-Tat Lim, Pim Schellart [X] (Inactive), Russell Owen, Tim Jenness
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Planned End:

                  Summary Panel