Convert local time to GMT

Hi everybody,
i receive a lot of operation date from many worldwide ports like these:
SINGAPORE 23/FEB/2011 13:50 (local time)
GHENT(NL) 23/FEB/2011 12:00 (local time)
i'm required to convert these information to GMT date.
I've found NEW_TIME function but it seems inadequate:
1) the function does not consider daylight saving periods; i mean when tmz1 switches from daylight savings on to daylight savings off and tmz2 does not, the function does not change the time difference (at least it's the result of my test unless all valid timezones switch at the same time)
2) valid parameters are 18 therefore they don't cover all the possible combinations
Could you please help to cope the matter ?
Many thanks in advance
Stefano

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by David Hsiung ([email protected]):
How can i convert local time to GMT time in
the Form?<HR></BLOCKQUOTE>
David,
there is a date function caled NEW_TIME that should work. For ex:
select to_char(new_time (sysdate, 'EST','GMT'), 'HH:MI:SS')
from dual;
05:31:00

Similar Messages

  • Convert date/time to GMT format

    Hi,
    I want to convert my current system date to GMT format. the class java.util.Time/Calender have methods which help u to convert from GMT to local time.
    is there a method to convert from current System Date to GMT.
    tx in advance

    i found the answer to my earlier question from the postings. Now i need help with the format og the Date in GMT.
    i used the following code to get the GMT based on the system time
    Calendar here = Calendar.getInstance();
    int gmtoffset = here.get(Calendar.DST_OFFSET)
    + here.get(Calendar.ZONE_OFFSET);
    //to convert to GMT time
    Date GMTDate = new Date(System.currentTimeMillis() - gmtoffset);
    the result of exceuting the following code is
    GMT Date is Mon Aug 20 18:39:19 EDT 2001
    but i need the GMT time in this format
    20010820-18:39:40
    tx
    Namrata

  • Internationalization  issue : convert date/time to GMT/UTC

    We have our webservices running in websphere /oracle.There is this requirement to internationalize the application ...like
    a) language .....
    d)Internatiolization of time :
    For this requirment I am planning to do the following.Service request with date will be converted to GMT before it is stored in database and the response back will be converted from GMT back to the time zone of the requester and have the application server/database server configured to UTC time.Is this a good strategy or is there a better one.
    Thanks
    m

    Manjit wrote:
    Sabre,to confirm again...you are suggesting that there is even no need to change the oracle Date field from Date type to Timestamp.The only thing I really have to do is for display purpose convert/format the response date to the zone the request is coming from.Please let me know if I missed anything.The above statement is indefinite.
    Are you starting with a java.util.Date or perhaps a java.sql.Timestamp?
    Then you do NOT convert them. You display them. You use SimpleDateFormat for that. You do not concern yourself at all with timezones exception in terms of creating a SimpleDateFormat. And that is ONLY an issue if you are creating the string (display value) on a server. If you are doing that you will need the client to provide you with a timezone. There is no magic way to get that from the client. If a client app is doing the display the the client is running in a client VM and that VM will already have a display format that might be suitable.
    Conversely if you are receiving a timestamp value as a text value (say read it from a file) then you must convert that into a java.util.Date. You do that via SimpleDateFormat. The specifics of how you do that depends on the form of the text value.

  • Convert date time local Timezone  to GMT

    I need to get GMT time...
    How to convert local time to GMT ?
         public static long getGMTNow()
             Calendar local = new GregorianCalendar();
             local.set(Calendar.HOUR_OF_DAY, 0);              
             local.set(Calendar.MINUTE, 0);
             local.set(Calendar.SECOND, 0);
             System.out.println(local.getTime());
             System.out.println(local.getTimeInMillis());
             Calendar gmtC = new GregorianCalendar(TimeZone.getTimeZone("GMT"));
             gmtC.setTimeInMillis(local.getTimeInMillis());
             System.out.println(gmtC.getTime());
             return gmtC.getTimeInMillis();
         }Result :
    Thu Feb 12 00:00:00 EST 2009
    1234414800034
    Thu Feb 12 00:00:00 EST 2009
    1234414800034

    Calendar gpsTime = new GregorianCalendar(TimeZone.getTimeZone("GMT"));
             gpsTime.set(Calendar.HOUR_OF_DAY, 10);              
             gpsTime.set(Calendar.MINUTE, 0);
             gpsTime.set(Calendar.SECOND, 0);
             System.out.println("gpsTime: "+gpsTime.getTime());
             Calendar realtime= new GregorianCalendar();
             realtime.set(Calendar.HOUR_OF_DAY, 5);              
             realtime.set(Calendar.MINUTE, 0);
             realtime.set(Calendar.SECOND, 0);
             System.out.println("realtime: "+realtime.getTime());
             System.out.println("COMPARETO : "+ realtime.compareTo(gpsTime));
             long timediff = realtime.getTimeInMillis() - gpsTime.getTimeInMillis();
             System.out.println(timediff/1000 + " sec");RESULT :
    gpsTime: Mon Feb 16 05:00:00 EST 2009
    realtime: Mon Feb 16 05:00:00 EST 2009
    COMPARETO : 1
    0 secOk, I done my homework. getTime() will allways return local time so I need to set the GPS time to a GMT Calendar to get the right result.
    Funny thing, look at the compareTo result....

  • Convert Local Date and Time into GMT

    In Oracle how to convert date & time in GMT. Suppose the input will be local date & time e.g. ‘IN’, ‘15/11/2010 15:20:30’ ( country Code, DD/MM/YYYY Hr:Min:Sec in 24hr format) output should be in GMT format.

    I don't think this should be in the OLAP subforum. At least try to look for the correct section before posting next time.
    Apart from that, you can try a combination of the From_Tz and Tz_Offset functions.
    http://www.techonthenet.com/oracle/functions/from_tz.php
    http://www.techonthenet.com/oracle/functions/tz_offset.php
    I hope it helps.
    Joan

  • Function Module To Change TIME from GMT to CST

    Hello All,
    Can anyone tell me if there is any Function Module to convert the TIME from GMT to CST?
    Regards

    Hi Sunil,
    use the following code.
    DATA :
      timestamp like TZONREF-TSTAMPS,
      time      like sy-uzeit,
      date      like sy-datum.
    The following function module is used to convert the
    time and date into GMT timestamp
    CALL FUNCTION 'IB_CONVERT_INTO_TIMESTAMP'
      EXPORTING
        i_datlo           = sy-datum
        i_timlo           = sy-uzeit
        I_TZONE           = 'INDIA'
    IMPORTING
       E_TIMESTAMP       = timestamp.
    The following function module is used to convert the
    above obtained timestamp to PST timezone date and time.
    CALL FUNCTION 'IB_CONVERT_FROM_TIMESTAMP'
      EXPORTING
        i_timestamp       = timestamp
        I_TZONE           = 'CST'
    IMPORTING
        E_DATLO           = date
        E_TIMLO           = time.
    write :/ 'Date and Time at PST zone is ',date, time.
    Reward if helpful.
    Thanks,
    Naveen.

  • HELP - How to Convert Date in GMT to Local time in Applet

    Hi All
    Is there a way to convert a date from GMT format into a local time say IST in my Java applet, this GMT date is coming from a postgresql database.
    Thanks in advance
    Swaraj

    Try this with your customization:
    java.text.SimpleDateFormat format0 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    java.text.SimpleDateFormat format1 = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
    java.util.Calendar cal0 = Calendar.getInstance(new SimpleTimeZone(0, "GMT"));
    java.util.Calendar cal1 = Calendar.getInstance(new SimpleTimeZone((int)(5.5*60*60*1000), "IST"));
    format0.setCalendar(cal0);
    format1.setCalendar(cal1);
    java.util.Date date = format0.parse("2003-01-25 00:15:30");
    java.lang.String formatted = format1.format(date);
    System.out.println(formatted);

  • Need to convert time to GMT or UNIVERSAL CO-ORDINATED TIME

    Hi,
        I need to convert a date and time to UNIVERSAL CO-ORDINATED TIME or GMT. Is there any function module to do the same. Please do let me know.
    TIA
    Gurpreet

    Hi,
    Here is the example program to conver the time to UTC
    DATA: time_stamp TYPE timestamp,
           dat TYPE d,
           tim TYPE t,
           tz   TYPE ttzz-tzone,
           dst (1) TYPE c.
    tz = 'UTC '.     " You need to maintain the ZONE
    time_stamp = 20030309033000.
    CONVERT TIME STAMP time_stamp TIME ZONE tz
            INTO DATE dat TIME tim DAYLIGHT SAVING TIME dst.
    WRITE: /(10) dat, (8) tim, dst.
    time_stamp = 20030309043000.
    CONVERT TIME STAMP time_stamp TIME ZONE tz
            INTO DATE dat TIME tim DAYLIGHT SAVING TIME dst.
    WRITE: /(10) dat, (8) tim, dst.
    Regards
    Sudheer

  • Convert server time to local in mscrm 2011

    Hi ,
     I am getting 9hours variation and it is taking some cannada time and I want to convert it into local time  . This is my temporary solution  when I selected timezone format(i.e in options) as india it  is working fine but when
    I changed my timezone to some other country it is giving me variation. can u plz help out the permanent solution in mscrm.
    function dateTime() {
        var createdon = Xrm.Page.getAttribute("createdon").getValue();
        var formType = Xrm.Page.ui.getFormType();
        var date = new Date();
          if (formType != 1) {
            if (createdon != null) {
                createdon.setHours(createdon.getHours() + 2);       
                if (date > createdon) {
                    Xrm.Page.ui.controls.get("fmc_followupby").setDisabled(true);

    Hi hiteksha,
    Since the issue regards CRM. It is out of the support boundaries of our forum, I suggestion you post the question in the following forum:http://social.microsoft.com/Forums/en-US/home?forum=crm.
    It is appropriate and more experts will assist you.
    Thank you for your understanding.
    Regards,
    Katherine xiong
    Katherine Xiong
    TechNet Community Support

  • Convert Data time stamp to Local Time

    Hello,
    I want to convert this input to local time EST.
    Input:12/8/2006 10:23:00.000000000 PM -06:00
    o/p: EST.Local Time

    Is the input a string? A timestamp? If so, which flavor of timestamp? Something else?
    Normally, you'd want to use a TIMESTAMP WITH LOCAL TIME ZONE data type for this sort of requirement, since it automatically converts data to the client's time zone. Assuming the input is a string and that the client's time zone is set to EST
      1  select cast(to_timestamp_tz( '12/8/2006 10:23:00.000000000 -06:00',
      2                               'MM/DD/YYYY HH24:MI:SS.FF TZH:TZM' )
      3                AS TIMESTAMP WITH LOCAL TIME ZONE)
      4*   from dual
    SCOTT @ nx102 JCAVE9420> /
    CAST(TO_TIMESTAMP_TZ('12/8/200610:23:00.000000000-06:00','MM/DD/YYYYHH24:MI
    08-DEC-06 11.23.00.000000 AM
    Elapsed: 00:00:00.01
    SCOTT @ nx102 JCAVE9420> Justin

  • Converting UTC time stamp to local time (CET)

    Is there a smooth way to convert a time stamp from UTC time into the local time (e.g. CET)?
    CONVERT TIME STAMP.... Just converts the timestamp from local time zone to UTC, is there another comand to perform the opposite conversion?
    TIA!
    /Armin

    Hi Armin
    The statement does not only convert from local time zone to UTC you can specifiy any timezone:
    CONVERT TIME STAMP time_stamp TIME ZONE tz
            INTO [DATE dat] [TIME tim]
            [DAYLIGHT SAVING TIME dst].
    The following statement can also be used to convert from date time to timestamp.
    CONVERT DATE dat [TIME tim [DAYLIGHT SAVING TIME dst]]
            INTO TIME STAMP time_stamp TIME ZONE tz.
    Regards
    Faaiez

  • Need function module to convert system time to local time

    Hi Experts,
    Need function module to convert system time to local time.
    i.e country specific that to in HH:MM format.
    Thanks in advance.

    Dear Prince,
    Kindly check the following link which contains the list of function modules for date and time conversion.
    [http://www.sap-img.com/abap/date-month-pop-related-function-modules.htm]
    Regards

  • GMT or local time in background processing ?

    Hello all,
    In the Background Processing transaction, is the time for scheduled job in GMT or in Local time ?
    Regards,
    Michaël.

    Hello Michaël,
    As far as I remember you specify there local time.
    Regards,
    Alex.

  • Convert system time into User local time.

    Hi,
    How to convert System time into User Local time.
    Are there any FMs available.
    Regards,
    Kiran

    hi,
    There is just one simple funda behind the Date and time logic in SAP.
    -> It is absolutely useless to store Date and time directly in DB. Why ?
    Because 00:00 a.m in London could mean 05:30 in India !! So If I (in India) store a Date 1st Feb 2008 , 10:00 a.m .. This time for a person in London could be invalid.. because he is behind your time zone..
    So the solution is to store the date/times in Timestamps format. Taking the above example.. 1st Feb 2008, 10:00 a.m (in India) will be stored as 20080201043000.
    This time if seen in German Time zone will look as : 1st Feb 2008, 05:30 a.m.
    Simple right
    -> In India we store date as DD.MM.YYYY while in other countries they store it as MM.DD.YYYY.
    The separator could be . or - or / .
    The date format is user dependent. I might prefer to store it as DD.MM.YYYY and you might want to store it as MM-DD-YYYY.
    System does not bother what your format is. It always stores in YYYYMMDD (8 Char)
    On screens if you want to display Date then it must always be shown in that users format who is seeing it. How to get this done ?
    DATA : lv_date(10) type c.
    write sy-datum into lv_date.
    So in LV_DATE variable the date will be stores in the users format.
    Simple right
    There are function modules that do the same. But normally we should avoid use of FM to make code simpler, short and easy... no complications at all ..
    You can use system variables sy-datlo (Local Date for Current User) and sy-timlo ( Local Time of Current User ).
    You can also use GET TIME statement.
    reward if useful,
    preet

  • Why does my calender reset to gmt instead of local time?

    my  calendar on my iPhone (5s, 8.0.2) resets to gmt instead of local time. This started after I upgraded to ios8
    time zone override is off

    Make sure your settings are correct:
    http://help.apple.com/iphone/8/#/iph3d11102c

Maybe you are looking for

  • Can you move a group of items from one keychain to another?

    In the process of setting up Leopard, I wound up with a "login" keychain and an "old" keychain. The login keychain opens nicely when I login, but the old one needs me to open it manually the first time its called during a session. Not a great inconve

  • JMS Problems

    I need to do a few things with sensors that involve jmsQueue. I´m very new to the jms technology. I need to do a pooling from a jms queue. I want to do a simple flow. Read the values inserted from the keyboard, write them to a queue and read them fro

  • How can read and process data uploded from a datalogger on a network with labview

    hello evryone. i have a agilent datalogger 34972a data acquire temperature reading and makes them availlable on a network. i would like to acess this data on a pc running labview, analyse and prsent them. my problem is that i am not quite sure how to

  • Since Frontier bought Verizon, my graphics are missing in my email. Why?

    Since the change in ownership, my email is drab black & white mostly. There is very little color. Also, there are no boxes to check to move an email to a folder. Each email must be opened and then it can be sent to a folder. If I use IE, the email is

  • [SOLVED] cant install acpi_call-git

    cant install acpi_call-git from aur here is the output Comment by CIB (2013-08-02 13:22) Getting errors when trying to build this, it seems to rely on something already being in /usr/lib/modules/3.10.3-1-ARCH/build Does this rely on some kernel sourc