QUERY TIME
Authorization
Privilege Class: G
Purpose
Use QUERY TIME to display the following:
- Current time
- Time zone
- Day of the week
- Date
- Connect time for the current session
- Processor time for the current session
Operands
- SHOrtdate
- specifies that dates in the response to this command will be displayed in mm/dd/yy format, where mm is the month, dd is the day of the month, and yy is the 2-digit year.
- FULldate
- specifies that dates in the response to this command will be displayed in mm/dd/yyyy format, where mm is the month, dd is the day of the month, and yyyy is the 4-digit year.
- ISOdate
- specifies that dates in the response to this command will be displayed in yyyy-mm-dd format, where yyyy is the 4-digit year, mm is the month, and dd is the day of the month.
- Offset
- indicates that you want to see the difference between the system's current time zone and Coordinated Universal Time (UTC).
Usage Notes
- If the wait-state interpretation capability is available on the real processor, it is used for dedicated virtual CPUs. When the wait-state interpretation capability is used, the guest virtual machine remains dispatched even when it enters a PSW enabled-wait state. Time consumed dispatched in the wait state is included in the virtual and total CPU time reported for the guest.
- The default date format for certain CP and CMS commands can be set on a system-wide basis and
also for the individual user. The system-wide default date format is set with the SYSTEM_DATEFORMAT
system configuration statement. The user's default date format is set with the DATEFORMAT directory
statement. The system-wide default and the user's default can also be set with the CP SET DATEFORMAT
command. The user's default date format defaults to the system-wide default. The system-wide and
user settings can be queried with the CP QUERY DATEFORMAT command. The hierarchy of possible date
format settings for the QUERY TIME command, from highest priority to lowest, is:
- QUERY TIME command operand
- User default
- System-wide default
Responses
Response 1:
If you enter QUERY TIME SHORTDATE, you get the following response:
TIME IS hh:mm:mm zone weekday mm/dd/yy
CONNECT= hh:mm:ss VIRTCPU= mmm:ss.hs TOTCPU= mmm:ss.hs
This shows the current real clock time (in hours, minutes, and seconds), the time zone (for example,
EST), the day of the week, and the calendar date. Response 2:
If you enter QUERY TIME FULLDATE, you get the following response:
TIME IS hh:mm:mm zone weekday mm/dd/yyyy
CONNECT= hh:mm:ss VIRTCPU= mmm:ss.hs TOTCPU= mmm:ss.hs
Response 3:
If you enter QUERY TIME ISODATE, you get the following response:
TIME IS hh:mm:mm zone weekday yyyy-mm-dd
CONNECT= hh:mm:ss VIRTCPU= mmm:ss.hs TOTCPU= mmm:ss.hs
Explanation of Response 1, 2, and 3 Contents:
- CONNECT= hh:mm:ss
- identifies the actual clock time consumed in the current session in hours, minutes, and seconds. The maximum value for this field is 99:59.59. A time value larger than the maximum will be indicated by this value.
- VIRTCPU= mmm:ss.hs
- identifies the virtual processor time consumed in the current session in minutes, seconds, and hundredths of seconds. The maximum value for this field is 999:59.99. A time value larger than the maximum will be indicated by this value. If multithreading is enabled, this is reported as MT-1 equivalent time.
- TOTCPU= mmm:ss.hs
- identifies the total processor time (virtual and overhead) consumed in the current session in minutes, seconds, and hundredths of seconds. The maximum value for this field is 999:59.99. A time value larger than the maximum will be indicated by this value. If multithreading is enabled, this is reported as MT-1 equivalent time.
Response 4:
If you enter QUERY TIME OFFSET, you get the following response:
Time zone zone is hh.mm.ss direction of UTC.
shows the current time zone's offset from UTC, Coordinated Universal Time.- zone
- is the 1- to 3-character identifier (for example, EST) that indicates the current time zone.
- hh.mm.ss
- is the number of hours, minutes, and seconds that the current time is offset from UTC.
- direction
- is the geographical direction of this time zone from longitude 0. direction may be EAST or WEST.
You could also receive this response:
Time zone zone is equivalent to UTC.
This means the value for the adjustment from UTC (the hh.mm.ss value) is zero.
Messages
- HCP003E Invalid option - {option|command contains extra option(s) starting with option}