Convert time from one time-zone to another

data: l_timestamp type tzonref-tstamps.

call function ‘IB_CONVERT_INTO_TIMESTAMP’
  exporting
    i_datlo     = lv_date
    i_timlo     = lv_time
    i_tzone     = ‘EST’
  importing
    e_timestamp = l_timestamp.
if sy-subrc = 0 and l_timestamp is not initial.
  call function ‘IB_CONVERT_FROM_TIMESTAMP’
    exporting
      i_timestamp = l_timestamp
      i_tzone     = ‘PST’
    importing
      e_datlo     = lv_date
      e_timlo     = lv_time.
endif.

 

Leave a comment