TACL Reference Manual
Built-In Functions and Variables
HP NonStop TACL Reference Manual—429513-018
9-80
#CONVERTTIMESTAMP Built-In Function
Example
This example obtains the current Greenwich mean time, converts the timestamp to
local civil time (LCT), and displays the GMT and LCT in component form:
?SECTION convtime ROUTINE
#FRAME
#PUSH gmttime, loctime, err
#SET gmttime [#JULIANTIMESTAMP]
#SETMANY err loctime , [#CONVERTTIMESTAMP gmttime 0]
SINK [IF [err] |THEN|
#OUTPUT Error occurred: [err]
|ELSE|
#OUTPUT GMT = [#INTERPRETTIMESTAMP gmttime]
#OUTPUT LCT = [#INTERPRETTIMESTAMP loctime]
]
#UNFRAME
When the preceding routine is invoked, TACL displays:
GMT = 2448713 1992 3 31 0 53 47 174 708
LCT = 2448712 1992 3 30 16 53 47 174 708