(go to: table of contents, index, list of vms_lib, prev: CVTF_TO_INTERNAL_TIME, next: DATE_TIME)
CVT_VECTIM - Convert 7-Word Vector to Internal Time
Format:
23-MAR-1999 ZE.
resultant_time = vms_lib.cvt_vectim (input_time)
Returns:
Arguments:
See GENMAN 'Programming',
'special OpenVMS datatypes'
for details.
Examples:
(year, month, day, hour, minute, second, hundredth)
>>> import vms_lib
>>> input_time = (2000, 2, 29, 12, 34, 56, 78)
>>> resultant_time = vms_lib.cvt_vectim (input_time)
>>> print resultant_time
44585444967800000L
>>> import vms_sys
>>> print vms_sys.asctim (resultant_time)
29-FEB-2000 12:34:56.78
>>> resultant_time = vms_lib.cvt_vectim ((2000, 2, 29, 12, 34, 56, 78))
>>> print vms_sys.asctim (resultant_time)
29-FEB-2000 12:34:56.78
>>> # a tuple is required as argument 1 - not seven arguments
>>> resultant_time = vms_lib.cvt_vectim (2000, 2, 29, 12, 34, 56, 78)
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: function requires exactly 1 argument; 7 given
>>>
>>> # wrong order of arguments
>>> input_time = (78,56,34,12,29,2,2000)
>>> resultant_time = vms_lib.cvt_vectim (input_time)
Traceback (innermost last):
File "<stdin>", line 1, in ?
vms_lib.error: (1410012, '%LIB-F-IVTIME, invalid time passed in,\
or computed')
>>>
(go to: table of contents,
index,
list of vms_lib,
prev: CVTF_TO_INTERNAL_TIME,
next: DATE_TIME)