QAD 2017 Enterprise Edition > User Guides > Service/Support Management > Multiple Time Zones > MTZ Reference > Converting Times
  
Converting Times
The fstzcon.p utility converts times from one time zone to another using the four input parameters listed in Input Parameters for fstzcon.p.

Input Parameters for fstzcon.p
 
Parameter
Description
from-date
Input date stored in input time zone
from-time
Input character time stored in input time zone with a format of HHMM
from-zone
Input character time zone
to-zone
Output character time zone
Output Parameters for fstzcon.p lists the program’s three output parameters.

Output Parameters for fstzcon.p
 
Parameter
Description
to-date
Output date converted to output time zone
to-time
Output character time stored in output time zone with a format of HHMM
effflag
Logical to indicate if an error occurred (date and time will be returned unconverted)
The following example illustrates how to convert the current system time to EST/EDT.
define variable from-time as character format "99:99".
define variable to-date as date.
define variable to-time as character format "99:99".
define variable errflag as logical.
{mfdeclre.i}
find first svc_ctrl no-lock.
assign from-time = string(time,"HH:MM")
from-time = substring(from-time,1,2) /* remove colon */
+ substring(from-time,4,2).
{gprun.i ""fstzcon.p""
"(input today,
input from-time,
input svc_server_timezone, /* svc__qadc01 before 8.7 */
input ""EST/EDT"",
output to-date,
output to-time,
output errflag)"}