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: 

System time ( PC time) Problem

Former Member
0 Kudos

Dear Team,

We r trying to display PC time through system fields..but iam not getting current PC time,,it is giving application server time..Plz help me ,,how to change to india time.My requirement to get current time of PC through abap.Plz help me out...

9 REPLIES 9

Former Member
0 Kudos

if you go to menu option

System->user profile -> own data

pick the DEFAULTS tab

you will see a field for the personal time zone of the user. If this is set to your local time zone, then you should see times displayed as correct locally, rather than the application server time zone.

Kanagaraja_L
Active Contributor
0 Kudos

Check Fm SQLT_TRACE_KERNEL_TIME

Kanagaraja L

0 Kudos

FM also giving wrong time...i think it is showing application server time..

matt
Active Contributor
0 Kudos

>

> FM also giving wrong time...i think it is showing application server time..

Yes, it is. That's what happens when people don't read the question.

Why do you need to know the time on the PC? You might be able to use CL_GUI_FRONTEND_SERVICES=>EXECUTE to run a program that sets an environment variable, and then use CL_GUI_FRONTEND_SERVICES=>ENVIRONMENT_GET_VARIABLE to read the variable.

matt

Edited by: Matt on Dec 11, 2009 4:02 PM

0 Kudos

Dear Sir,

I can't get local time with this calss...Plz give option to get India local time to display.

matt
Active Contributor
0 Kudos

If the users' accounts are correctly maintained with the timezone (as mentioned above), then sy-timlo contains the local time. ( And sy-datlo the local date ).

TZ_SYSTEM_TO_LOCAL will convert a date/time to local.

matt

0 Kudos

Hi,

Use the function module OIL_GET_CURRENT_DATE_TIME and pass the system time zone.

Then it will retrieve the current system time. This will change as per the user settings.

Change your user settings to the zone you are in using the table TTZZ and then it will give you the current desktop time.

Regards

Shiva

Former Member
0 Kudos

Halo ggggmohan,

Try using CONVERT statement with TIMEZONE IST

Regards

Arshad

Former Member
0 Kudos

Hi Mohan,

Plese use following FM's to convert to local india time.

IB_CONVERT_INTO_TIMESTAMP it will convert date and time to Timestamp.

Exporting parameters:

I_DATLO = sy-DATLO

I_TIMLO = sy-TIMLO

I_TZONE = sy-ZONLO.

Out put of above FM is Timestamp. Pass this time stamp to FM IB_CONVERT_FROM_TIMESTAMP

Exporting Parameters:

I_TIMESTAMP = 'Time Stamp from Above FM'

I_TZONE = 'INDIA'.

You will get the System time.