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

Timestamp/Timezone issue

SandeshK
Participant
0 Likes
1,768

Hi All,

We have an issue with the SAP system timestamp and timezone. Hope you can help me out:

We are on SAP CRM system and basically we have this issue with standard business documents. SAP System is configured to CET timezone. I have checked in TTZCU table too , TZONESYS and TZONEDEF are both CET and there is no user specific timezone when checked in SU01D(user profile).

To make things simpler, I have written a small program which explains the issue:


DATA locl_tstmp TYPE  crmt_date_timestamp_from.


WRITE: 'Current Date'sy-datum.

WRITE:/'Current Time'sy-uzeit.

WRITE:/'Time Zone'sy-zonlo.


CONVERT DATE sy-datum

         TIME sy-uzeit

         INTO TIME STAMP locl_tstmp

         TIME ZONE 'CET'.

Now when I execute this above program, below is the result I get:


Current Date 23.09.2014

Current Time 11:17:20

Time Zone CET

CET 23.09.2014 09:17:20

Current Date, Current Time, Time zone are correct. But when i explicitly (Line 08) convert the date and time to time zone CET , it actually converts to UTC time i.e 09:17:20 in the above program result which is wrong.

Why is it converting to UTC and not CET though I have given TIME ZONE 'CET'  at line 10?

1 REPLY 1
Read only

SandeshK
Participant
0 Likes
910

Closing the issue. I think I got it , CONVERT DATE TIME INTO TIME STAMP TIME ZONE will convert with respective to UTC timezone and not with the current system timezone.