(go to: table of contents, index, list of vms_sys, prev: SUSPND, next: TRNLNM)
Format:
TIMCON - Time Converter
Converts 128-bit Coordinated Universal Time (UTC) format to 64-bit
system format or 64-bit system format to 128-bit UTC format based on the value
of the convert flag.
09-JAN-1999 ZE.
utcadr = vms_sys.timcon ([timadr] , cvtflg=1)
timadr = vms_sys.timcon ([utcadr] , cvtflg=0)
Returns:
Arguments:
See GENMAN 'Programming',
'special OpenVMS datatypes'
for details.
Examples:
See GENMAN 'Programming',
'special OpenVMS datatypes'
for details.
>>> import vms_sys
>>> o_utctim = vms_sys.getutc ()
>>> print vms_sys.ascutc (o_utctim)
9-JAN-1999 20:24:31.25
>>> o_utctim
21584378040929278433485881193570887456L
>>>
>>> q_bintim = vms_sys.timcon (o_utctim,0)
>>> print vms_sys.asctim (q_bintim)
9-JAN-1999 20:24:31.25
>>> q_bintim
44226302712500000L
>>>
>>> q_bintim = vms_sys.gettim ()
>>> print vms_sys.asctim (q_bintim)
9-JAN-1999 20:25:00.90
>>> q_bintim
44226303009000000L
>>>
>>> o_utctim = vms_sys.timcon (q_bintim,1)
>>> print vms_sys.ascutc (o_utctim)
9-JAN-1999 20:25:00.90
>>> o_utctim
21584378040929278433485881193867387456L
>>>
>>> q_bintim = vms_sys.gettim ()
>>> print vms_sys.asctim (q_bintim)
9-JAN-1999 20:25:32.76
>>> q_bintim
44226303327600000L
>>> o_utctim = vms_sys.timcon (q_bintim,99)
>>> print vms_sys.ascutc (o_utctim)
9-JAN-1999 20:25:32.76
>>> o_utctim
21584378040929278433485881194185987456L
>>>
>>> q_bintim = vms_sys.timcon (None,0)
>>> print vms_sys.asctim (q_bintim)
9-JAN-1999 20:25:51.49
>>>
>>> q_bintim = vms_sys.timcon ("",0)
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: argument 1: argtim - must be long integer
>>>
>>> o_utctim = vms_sys.timcon (None,1)
>>> print vms_sys.ascutc (o_utctim)
9-JAN-1999 20:26:14.62
>>>
>>> o_utctim = vms_sys.timcon ("",1)
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: argument 1: argtim - must be long integer
>>>
(go to: table of contents,
index,
list of vms_sys,
prev: SUSPND,
next: TRNLNM)