Application Development and Automation 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: 
Read only

Converting date with timezone

Former Member
0 Likes
750

Hi all,

In Function Module SHP_BAPI_DELIVERY_CONFIRM_DEC a date conversion is performed

CONVERT DATE IS_LIKP-WADAT_IST INTO TIME STAMP CT_BAPIDLVDEADLN-TIMESTAMP_UTC

TIME ZONE IS_LIKP-TZONIS.

before executing command the values are:

IS_LIKP-WADAT-IST = 20070918

CT_BAPIDLVDEADLN-TIMESTAMP_UTC = SPACE

IS_LIKP-TZONIS = CET

My systems' timezone is SYST-ZONLO = CET

after executing the command the result is

CT_BAPIDLVDEADLN-TIMESTAMP_UTC = 20070917220000

I expected the same date as I put into the command (because target zone and system zone are the same.

Can somebody explain?

Thanks Ron

2 REPLIES 2
Read only

Former Member
0 Likes
601

Conversion to UTC timestamp!

Read only

Former Member
0 Likes
601

It's not necessarily going to give you the same date because it converts it to UTC reference time. Per SAP, here is the definition of UTC:

UTC

Abbreviation for Coordinated Universal Time. Basis for expressing worldwide time specifications. The UTC reference time is not a local time zone, but a general reference time based on atomic time standards , from which the times of all local time zones are derived. UTC is defined in such a way that it corresponds to Greenwich Mean Time (GMT). The UTC reference time differs slightly from Universal Time (UT1), which is linked to the rotation of the earth and where the mean solar day consists of 86400 seconds. By means of leap seconds, this difference is kept down to less than 0.9 seconds a year. In ABAP, UTC time specifications occur in conjunction with time stamps.