(LOGO.JPG) Python for OpenVMS

(go to: table of contents, index, list of vms_sys, prev: MOUNT, next: NUMUTC)


NUMTIM - Convert Binary Time to Numeric Time


Format:
    timbuf = vms_sys.numtim ([timadr])
Returns:
timbuf
a tuple of 7 (16-bit) integers consisting of:
(year, month, day, hour, minute, second, hundredth)
Arguments:
timadr
64-bit system time - a Python long integer.
See GENMAN 'Programming', 'special OpenVMS datatypes' for details.
Examples:
>>> import vms_sys

>>> q_date = vms_sys.bintim ('29-FEB-2000 12:34:56.78')
>>> q_date
44585444967800000L
>>> vms_sys.numtim (q_date)
(2000, 2, 29, 12, 34, 56, 78)
>>> # (year, month, day, hour, minute, second, hundredth)

>>> vms_sys.asctim ()
'12-AUG-1998 11:09:11.45'
>>> vms_sys.numtim ()
(1998, 8, 12, 11, 9, 14, 69)
>>> vms_sys.numtim (None)
(1998, 8, 12, 11, 9, 19, 69)
>>> # (year, month, day, hour, minute, second, hundredth)

>>> vms_sys.numtim (vms_sys.bintim ('0 01:02:03.45'))
(0, 0, 0, 1, 2, 3, 45)
>>> # (year, month, day, hour, minute, second, hundredth)

>>> vms_sys.numtim ('X')
Traceback (innermost last):
  File "<stdin>", line 1, in ?
TypeError: argument 1: timadr - must be long integer
>>>

(go to: table of contents, index, list of vms_sys, prev: MOUNT, next: NUMUTC)

28-SEP-1998 ZE.