Whilst looking at
DM-7742 I started to wonder why the DateTime constructor did not complain when it was given an MJD time system instead of a UTC time scale.
It seems we have two issues with DateTime that can lead to subtle bugs not being caught:
- Both the TimeScale and DateSystem enums share values in Python land. This means that in Python you can pass in an MJD but C++ will treat it as UTC. We should ensure that both these enums convert to different sets of integers in Python so that we can trap system/scale confusion.
- The DateTime constructor does not check all cases. It assumes that if the scale is not TT or TAI then the user probably meant UTC. The code in DateTime should never use an else to assume UTC but should always check and trigger and exception if the value is not recognized.