# In CLASS spectrum header

In the CLASS spectrum header, the date and time of observation of the spectrum is saved in the r%head%gen%dobs and r%head%gen%ut components, encoded respectively as an integer GAG date in days and a fraction of day in radians. If a scan overlaps midnight, this means that some spectra produced from the corresponding IMB-FITS refer to one day, and some other ones refer to the day after. However, this also means that the later spectra refer to a day which do not correspond to the scan number. In other words:

- these spectra would NOT be found when using FIND /OBSERVED date /SCAN number as only the spectra before midnight have the proper date,
- these spectra would be found when using FIND /OBSERVED date+1 /SCAN number while they were NOT observed during the named scan of the subsequent day.

In order to avoid this issue, the solution similar to the MRTCAL index is choosen. All the spectra produced from one scan will use the date associated to this scan, even if this scan overlaps midnight. In this latter case, the UT value will extend beyond 24 hours () to properly keep track of the date and time of the spectrum.