/* REXX Extract GMT offset from CVT and apply it */ cvt = storage(10,4) /* get the cvt address */ cvttz = storage(d2x(c2d(cvt)+x2d(130)),4) /* get cvttz value */ offset_seconds = trunc(c2d(cvttz,4) * 1.048576) local_seconds = time('S'); local_time = time() gmt_seconds = local_seconds - offset_seconds qualifier = '' if gmt_seconds < 0 then do qualifier = '(yesterday)' gmt_seconds = gmt_seconds + 86400 end if gmt_seconds > 86400 then do qualifier = '(tommorrow)' gmt_seconds = gmt_seconds - 86400 end ? = gmt_seconds gmt_hh = right(? % 3600,2,'0'); ? = ? - gmt_hh * 3600 gmt_mm = right(? % 60,2,'0'); ? = ? - gmt_mm * 60 say 'local time = ' local_time say '. g.m.t. = ' gmt_hh':'gmt_mm':'right(?,2,'0') qualifier exit