(PYVMS LOGO) Python on OpenVMS

(go to: table of contents, index, list of vms_sys, prev: ASCTOID, next: BINTIM)


ASCUTC - Convert UTC to ASCII


Format:
    timbuf = vms_sys.ascutc (utcadr [,cvtflg])
Returns:
timbuf
ASCII String
Arguments:
utcadr
128-bit UTC value - a Python long integer
cvtflg
conversion indicator
0 = return full date and time
1 = return only hour, minute, second, hundredths-of-second
Examples:
>>> import vms_sys

>>> utc_tim = vms_sys.getutc ()
>>> print utc_tim
21584378040929278433485881180047287456L
>>> print vms_sys.ascutc (utc_tim)
 9-JAN-1999 20:01:58.89
>>> print vms_sys.asctim ()
 9-JAN-1999 20:02:29.97

>>> utc_tim = vms_sys.binutc ('29-FEB-2000 12:34:56.78')
>>> print utc_tim
21584378040929278433486240335826187456L
>>> print vms_sys.ascutc (utc_tim)
29-FEB-2000 12:34:56.78

>>> print vms_sys.ascutc ()
 9-JAN-1999 20:03:31.58

>>> print vms_sys.ascutc (None)
 9-JAN-1999 20:03:40.65

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

(go to: table of contents, index, list of vms_sys, prev: ASCTOID, next: BINTIM)

09-JAN-1999 ZE.