Obtaining time of day and date

When an ETR is used, the time of day and date are set automatically at system initialization. In other configurations, the operator is responsible for initially supplying the correct time of day and date in terms of a 24-hour clock.

You can use the TIME macro to obtain the time of day and date for programs that require this information. If you specify ZONE=UTC or GMT with TIME, the returned time of day and date will be for Universal Coordinated Time. If you specify ZONE=LT or omit the ZONE parameter, the TIME macro returns the local time of day and date. However, if you specify STCK or STCKE, the ZONE parameter has no meaning. When you specify LINKAGE=SYSTEM with the TIME macro, you can select the format for the returned date by using the DATETYPE parameter.

All references to time of day use the time-of-day (TOD) clock, either the basic format (unsigned 64-bit binary number) or the extended format (unsigned 128-bit binary number). The TOD clock runs continuously while the power is on, and the clock is not affected by system-stop conditions. Normally, the clock is reset only when an interruption of processor power has caused the clock to stop, and restoration of power has restarted the clock at a later time. When an ETR is used, the clock reset happens automatically; in other configurations, the operator resets the clock. (For more information about the TOD clock, see Principles of Operation.)