Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Zero Returned Convert local date to UTC

mina_mouris
Explorer
0 Kudos
350
DATA: dat TYPE d,
tim TYPE t,
lv_utc_tstmp TYPE timestamp.
dat = '20230428'.
tim = '005954'.
CONVERT DATE dat TIME tim DAYLIGHT SAVING TIME 'X'
INTO TIME STAMP DATA(lv_utc_tstmp2) TIME ZONE 'EGYPT'.
cl_demo_output=>write_data( lv_utc_tstmp2 ).

I am trying to convert time from EGYPT to UTC.

When the time between 12:00:00 AM to 12:59:59AM, the returned value in lv_utc_tstmp2 is 0.

Can any one help me to solve this problem?

4 REPLIES 4

Sandra_Rossi
Active Contributor
0 Kudos
287

Please edit your question, select your code and press the button [CODE], which makes the code appear colored/indented, it will be easier for people to look at it. Thank you!

matt
Active Contributor
0 Kudos
287

Is EGYPT set up as a valid time zone on your system? Perhaps EGY would work? Egypt Standard Time?

mina_mouris
Explorer
0 Kudos
287

EGYPT is our active time zone on the system.

I tried to used EGY but it gave me the same of EGYPT "0"

raymond_giuseppi
Active Contributor
0 Kudos
287

AFAIK Egypt switched back to DST last Friday in April at 00:00 UTC+2:00, so those date/time don't exist.