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

Problem in timestamp

Former Member
0 Likes
1,595

Hi Experts,

       There was a problem in my time stamp.

       In my web dynpro compinent i am using timestamp feature for comments.

      for every comment i posted in a table i am also adding times stamp with this comment but when i see this time stamp in the table its giving wrong time

     Following is the statement

     CONVERT DATE sy-datum TIME sy-uzeit INTO TIME STAMP ls_comments-timestamp TIME ZONE sy-zonlo.

      time zone sy-zonlo is EST. Time is showing almost 5 hours forward

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,327

That's the way timestamp works.  You have local time zone set as EST, the timestamp calculation is then based upon UTC - local time zone, for which I typically have a five hour difference.  Try creating your time zone with time zone set to space in a variable.  I did that, as I recall, to force local time into the table in one of my programs.

5 REPLIES 5
Read only

Former Member
0 Likes
1,327

Hi,

I dont think you need to concatenate to get the timestamp.You can directly write like below:

get time stamp field v_timestamp.

For help you can refer to the below link:

http://help.sap.com/abapdocu_70/en/ABAPGET_TIME-STAMP.htm

Hope it solves your problem.

Read only

0 Likes
1,327

No after writting like that also its giving 5hours more

Read only

former_member209818
Active Contributor
0 Likes
1,327

In the table it must be storing the timestamp as per the system time-zone. Check your Time-Zone and System timzone.. I believe you will get the difference between these two time zone as 5 hours

Read only

Former Member
0 Likes
1,328

That's the way timestamp works.  You have local time zone set as EST, the timestamp calculation is then based upon UTC - local time zone, for which I typically have a five hour difference.  Try creating your time zone with time zone set to space in a variable.  I did that, as I recall, to force local time into the table in one of my programs.

Read only

0 Likes
1,327

Thanks break Point,

now i am able to retrieve  correct time.