!DT_Base

Contains the value of Julian Day 1 (September 14, 1752) as a !DT structure. Used in various Date/Time calculations. This value can be overridden using the Base keyword as a parameter to the SEC_TO_DT and DT_TO_SEC routines.

This variable can also be modified directly; however, if you do this, you must set the last field (the recalc flag) of the !DT structure to 1. For more information, see the section Recalc Flag in the PV‑WAVE User Guide.

Date/time calculation notes

It is possible when working with date/time functions for the Julian day to become out of sync with the remaining fields of the !DT structure. If you have noticed these changes while using the DT_COMPRESS Function or JUL_TO_DT Function , we recommend using the new keyword SetToZero when calling the DT_COMPRESS routine, and modifying the !DT_BASE system variable directly to an “empty” date/time variable by assigning !DT to !DT_BASE.

For example:

!DT_BASE = {!DT}
CREATE_WEEKENDS, ['Saturday', 'Sunday']
day1 = VAR_TO_DT(2015, 1, 1)
dt_array = DTGEN(day1, 366)
Julian_day = DT_COMPRESS(dt_array, /SETTOZERO)
result = JUL_TO_DT(Julian_day)