‎2009 Dec 22 4:35 AM
hi ,
Currently i am using sy-uzeit system variable for system time bur it is showing paris time i want indian time please help me for that,
and in our application server time is paris time only .
Thanks in advance.....
‎2009 Dec 22 4:42 AM
Hi,
You can search in forums first
I think you can use system variable SY-TIMLO for local time.
regards,
Nazeer
‎2009 Dec 22 4:41 AM
Hi Ankita,
Use GET TIME STAMP FIELD f statement to get UTC (Greenwich Mean Time)
Subsequently use statement CONVERT TIME STAMP tst TIME ZONE tz INTO DATE d TIME t to get the desired zone time.
Refer ABAPDOCU T-Code for these keyword help.
Cheers,
Suresh
‎2009 Dec 22 4:48 AM
‎2009 Dec 22 5:01 AM
Hi Ankita,
GET TIME STAMP FIELD f
Returns the time stamp in field f consisting of current date and time. The target field f contains the global reference time UTC (Universal Time Coordination).
Then using this field f you need to get Indian Time using statement
CONVERT TIME STAMP f TIME ZONE tz INTO DATE d TIME t
Converts between UTC time stamp "f" to date "d" or time "t" for time zone "tz"
The time stamp "f" always refers to UTC time (which you got from GET TIME STAMP FIELD f)
Refer values for timezone "tz" in table TTZZ (field TZONE)
Hope this is clear. Refer ABAPDOCU Transaction code and see the keyword documentation of the above two statements
Cheers
Suresh
‎2009 Dec 22 4:42 AM
Hi,
You can search in forums first
I think you can use system variable SY-TIMLO for local time.
regards,
Nazeer
‎2009 Dec 22 4:46 AM
I already checked SY-TIMLO it is also showing paris time only and i checked in forum also...
‎2009 Dec 22 4:50 AM
Hi Ankita,
From the link: http://searchsap.techtarget.com/tip/0,289483,sid21_gci970550,00.html
Here is how to handle time zones in ABAP when several time zones are involved in a project. This is quit helpful when processes are spread around several regions and/or countries.
Code
The time zone should be specified for each user with SU01.
Instead of using the fields SY-DATUM and SY-UZEIT, use the fields SY-DATLO and SY-TIMLO to get local time from the specified time zone for the user.
If you need to convert date and time into a local time zone, the function TZ_SYSTEM_TO_LOCAL should be used.
From the link: http://searchsap.techtarget.com/tip/0,289483,sid21_gci826364,00.html
This is regarding the conversion of time between different timezones. In order to achieve this, first we need to convert the time to standard GMT and from GMT to the required timezone.
The following function modules does the same.
The function module IB_CONVERT_INTO_TIMESTAMP is used to convert the time to the GMT. The input parameters are DATE, TIME and the TIMEZONE(user's timezone, default ...
Hope this helps you.
Regards,
Swarna Munukoti
‎2009 Dec 22 4:55 AM
Hello,
see the code below
DATA: time_stamp TYPE timestamp,
dat TYPE d,
tim TYPE t,
tz TYPE ttzz-tzone,
dst(1) TYPE c.
tz = 'INDIA'.
GET TIME STAMP FIELD time_stamp.
SKIP.SKIP.
write time_stamp.
SKIP.SKIP.
CONVERT TIME STAMP time_stamp TIME ZONE tz
INTO DATE dat TIME tim." DAYLIGHT SAVING TIME dst.
WRITE: /(8) tim.
copy paste this code and check ..
regards,
Nazeer
‎2009 Dec 22 4:48 AM
Hi,
Time in Paris = GMT + 1 hour and Time in India = GMT + 5.5 hours ( 5 hours 30 minutes )
Hence in your case,
Time in India = Time in Paris + 4.5 hours
Regards,
Bhavesh.
‎2009 Dec 22 4:50 AM
Hi ankita,
Refer this code
CALL FUNCTION 'RKE_TIMESTAMP_CONVERT_INPUT'
EXPORTING
i_date = sy-datum
i_dayst = sy-dayst
i_time = sy-uzeit
i_tzone = sy-tzone
IMPORTING
e_timestmp = ch_timestmp
EXCEPTIONS
date_invalid = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE e129(zms) WITH sy-datum sy-uzeit.
ENDIF.
Edited by: pravin s. on Dec 22, 2009 6:05 AM
‎2009 Dec 22 4:55 AM