How to get the connection with timeserver

Hi I displayed time(GMT) in my program with Date class, but it gives local time. But I need the UTC/GMT time.
Date date=new Date();Is there any way to get GMT?
And I have Internet connection......

Date date = new Date();
DateFormat df = DateFormat.getInstance();
System.out.println(df.format(date));
df.setTimeZone(TimeZone.getTimeZone("GMT"));
System.out.println(df.format(date));~

Similar Messages

  • How to get the connection with PM in sequencefactory?

    In SequenceFactory interface the following method
    public long getNext(Class cls, Connector connector)
    is to get the next sequence number, and one can use the connector to get a
    new connection, but at most time, when the kodo call this method, there
    must a PM exist, so if I want to use the connection with the exist PM, not
    a new connection, how can I get to it!

    Maguohai-
    You can't do this with datastore identity, but you could use application
    identity, and have the id assigned wherever use want, using SQL executed
    via a Connection obtained in the way described at:
    http://docs.solarmetric.com/manual.html#feature_sql_connection_access
    In article <bc0n3c$n9l$[email protected]>, maguohai wrote:
    Yes, you are right, but if generate the sequence need not transaction(for
    example using DBMS SEQUENCE OBJECT to get the sequence), and I don't want
    one application contains two connection at the same time. Is the any way I
    can do?
    Marc Prud'hommeaux wrote:
    Maguohai-
    The SequenceFactory implementation should use a second Connection in order
    to manipulate sequence numbers, since the transactional boundry for
    the sequence increment should not be bound to the transactional boundry of
    the PersistenceManager.
    In article <bbu83a$knd$[email protected]>, maguohai wrote:
    In SequenceFactory interface the following method
    public long getNext(Class cls, Connector connector)
    is to get the next sequence number, and one can use the connector to get a
    new connection, but at most time, when the kodo call this method, there
    must a PM exist, so if I want to use the connection with the exist PM, not
    a new connection, how can I get to it!
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • I have a problem with mail.  the spelling and grammer check box before sending the messege is no longer there.  I did everything but cannot get it back.  is ther anyone who knows how to get the box with spelling and grammer checks before sending

    i have a problem with mail.  the spelling and grammer check box before sending the messege is no longer there.  I did everything but cannot get it back.  is ther anyone who knows how to get the box with spelling and grammer checks before sending the mail.
    Also the mail is acting very funny by not getting the rules work in a proper method.  Is ther a software to repair mail.

    i did both of them, but still the while sending the mail the diolog box is not showing up and also the spelling and grammer does not do the spelling check. 
    This problem just started for about 3 to 4 days now.  earlier it was working normally.

  • How to get the itunes with those 3 colored buttons on top left corner ????ner ???

    Please help [humble request] ----
    I have 3 problems can u please help me out --
    1) How to get the itunes with the 3 colored buttons (i'm new to apple ,just 8 days so i dont know much stuff) on top left corner ,i've downloaded thrice from apple's site directly i everytime got the same sort of itunes with 'File' ,'Edit' ,'View' ,'Controls' ,'Store' ,'Adanced' ,'Help' on the top ,and also whenever i open the itunes store (in this itunes) only the app store opens ,now music albums ,movies ,tv shows nothing !!
    2) I dont know how to import video files from the computer to itunes
    3)i bought an app [fifa 11] ,n downloaded another 1 [contract killer] {ive deleted them and downloaded them thrice ,and they dont sync to my itouch it shows error (0xE800004C)
    Please please please help me im getting worried and frustrated
    please help me out with this

    but illaass
    i asked 2 of my frnds both of them have windows n not mac ,both of them are sayin dat they have the coloured buttons one , and i asked them dat how to access the itunes music store they said that when they kliked d itunes store option in the left side a screen appears where 6 -7 categories are there which are music store ,app store ,podcasts ,movies ,tv shows etc . bt when i open it it only shows d app store ,and on the bar only 4 options are ther the home icon , app store , podcasts and itunes u ,and when i klik movies ,tv shows on the left side ,there is an option "browse for movies in the itunes store" i klik it and only the app store opens and nothing else .
    and thanks now i know how to import videos
    and sigma 1337 ,
    ive downloaded the apps 4 -5 times now , still d same error mssg it comes like dis :-
    " Some of the apps in your iTunes library were not installed on the ipod "Shomik's ipod" because one or more errors occurred "
    please help me  im gettin frustrated

  • How to get the table with no. of records after filter in webdynpro

    Dear Gurus,
    How to get the table with no. of records after filter in webdynpro?
    Thanks in advance.
    Sankar

    Hello Sankar,
    Please explain your requirement clearly so that we can help you easily.
    To get the table records from your context node use method get_static_attributes_table()
    data lo_nd_mynode       type ref to if_wd_context_node. 
    data lt_atrributes_table  type wd_this->elements_mynode. 
    lo_nd_mynode = wd_context->get_child_node( name = wd_this->wdctx_mynode ). 
    lo_nd_mynode->get_static_attributes_table( importing table = lt_atrributes_table ). 
    Note: You should have already defined your context node as a Dictionary Structure.
    BR,
    RAM

  • How to resotre the connection with source sys

    hello friends ,
    need some help.
    COuld you please let me know how to retore the connection with R/3 system ?
    Unfortunately the R/3 systems are refreshed and connection has to be restore now with BW . As Here i do not have basis person in team , could you please let me know how to do this ?
    Thanks in advance
    Regards
    Manoj

    hai jain,
    first of all check out the connection is exit with r/3 system. select your r/3 systemselect customizing for extractorsif the connection is available it will lead to r/3 system. it will ask  user id and password for that system. other wise select the r/3 s.s--select check.
    if you want to restoreselect the source(r/3)right click itselect restore.
    hope this help you
    regards
    harikrishna N

  • How to get the connection name of a Dataprovider

    Hi,
         I have a report with stored procedure dataprovider.Now I need to write a VBA script to get the connection name of this dataprovider.Is it possible to get the connection name of dataprovider?
    Thanks
    Rakul.

    What product are you using? Are you using Crystal Reports? Business Objects Enterprise? SAP product(s)? You sure you are asking in the correct forum?
    Ludek

  • How to get the connection string at runtime

    Hi,
    I'm using Forms6i.
    I'm using EXEC_SQL to execute a dynamic sql in my form.
    I need connection string for that . But i cannot give it hardcodingly.
    Is there any form's properties to get the database connection string, to which the form is connected ?
    Thanks

    Hi,
    I've the user i/p columns
    EmpNo, Dept ,Holicode and , From and To Date.
    In which From and To Date is mandatory.
    In one table, emp_cal_header, i have all the holidays defined for each of the employees for a year.
    The records like
    EmpNo    Holicode     Holidt
    001        Frioff         02/07/2011
    001        Satoff        03/07/2011
    001        Frioff         08/07/2011
    .....So i want the final o/p in Excel like
    If user i/p is from Date: 01/07/2011 ,ToDate:09/07/2011, EmpNo :001
    EmpNo   Dept     Total  01/07/2011   02/07/2011 ..... 08/07/2011  09/07/2011
    001        IT        3               FriOff           Frioff            For this i'm constructing a dynamic sql like this
         qry := '(Select ech_emp_code cal_emp_code,emp_name CAL_EMP_NAME,emp_dept CAL_EMP_DEPT,count(ech_date) CAL_TOTAL'||date_cols||'
                             from (Select ech_emp_code,em.emp_name||'' ''||em.emp_middle_name||'' ''||em.emp_last_name emp_name,em.emp_dept emp_dept,ech_code,ech_desc,ech_date
                                            from emp_cal_header ,employee_master em
                                where emp_cal_header.ech_emp_code = em.emp_code
                                and  ech_emp_code = '||nvl(:emp_code,'ech_emp_code')
                                ||' and em.emp_status IN (''P'',''C'')'
                                ||' and em.emp_dept = '||dep
                                ||' and ech_date between '''||to_date(to_char(:From_dt,'DD-MON-YYYY'))
                                ||''' and '''  ||to_date(to_char(:To_dt,'DD-MON-YYYY'))
                                ||''' and ech_code = '||holi
                                ||' order by ech_Date)
                 group by ech_emp_code,emp_name,emp_dept)';
    and date_cols is constructed as
         todt := :from_dt ;
         i := 0;
         loop
              i := i+1;
              dt  := to_char(todt,'dd-MON-YYYY');
              date_cols     := date_cols||','||'max(decode(to_char(ech_date,''dd-MON-YYYY''),'''||dt||''',ech_CODE)) DT'||i;
              todt := todt + 1;
              Exit when todt > :to_dt ;
         End loop;This query i'm executing using EXEC_SQL.
    Since date_cols can be constructed only based on user i/p , i'm not able to do just a normal query
    Any help

  • How to get the connected Adapter Object for a particular BDoc Type?

    Hi All,
    I have a scenario in which CRM system is connected to ERP system.
    In SMW01 transaction, I can see one BDoc with BUS_TRANS_MSG as the BDoc Type in CRM.
    Now, how do I get to know if this one BDoc is a SALESDOCUMENT or SALESCONTRACT.
    Is there any way thorough which I can get to know the Adapter Object for this particular BDoc.
    Regards,
    Madhuri

    Hi Madhuri,
               Happy new year.
    In Transaction : R3AC1.
    You can observe the Linked BDOC for the adaptor objects. For example Sales docuemnt and Sales contrcat will have the same linked BDOC as "BUS_TRANS_MSG".
    If you see an error in SMW01, you want to find whether it is salesdocument or contract.
    1. Please take the Queue name from SMW01.
    from the queue name you can find whether it is sales contract or sales document.
    Queue name is customized in tables: SMOFQFIND.
    I hope this helps you.
    regards,
    Sri...

  • How to get the connected screen off when connected

    When I connect my iPod nano (4th gen - I believe) to both my car (through the AUX jack with a USB cord) and to my computer, the screen that says "Connected Eject before disconnecting" comes up and won't go away - even after it syncs and everything. In the car, it will plays some music but since I can't see my screen or any of my playlists I can't change the song or anything from the iPod. On the computer, I can click the eject button and the screen goes away and all if fine except that it obviously isn't connected and then won't sync. When the iPod isn't connected to the computer or the car it works fine. HELP!

        Hello, ghost3947-
    I am sure this would be quite frustrating! Let's take a look at that! Please ensure there is no debris in the HDMI port on the device. If dust, lint, etc get in that port, it can cause these sort of glitches. After you verify the port is clear, and it continues, please move on to a factory hard reset (http://tinyurl.com/9bgrztr) to resolve the concern. After the reset, the phone will walk you through activation and signing back into Google services. Keep me posted!
    Thanks,
    AdamE_VZW
    Follow us on Twitter @VZWSupport

  • How to cancel the connection with my HK BDS?

    Apperently my Harman Kardon BDS wants to connett my MackBook almost 30 times an hour. This is very anoying and I want to cancel this. Please help!!

    Your iPhone 4 should already be internet ready and you shouldn't need a dongle to use the phone. Depending on who you have your service with this is how they make there money by you using the Internet.. If I may suggest lookinto one of the plans that offers UNLIMITED Call, Text, Data, and everything else the phone is capable of for under $50.00 American there are several out there that offer this plan. T Mobile, Net10 just to name a couple. If your intent is to use a phone that has the capability but is not set up it is cheaper and less headaches in other ways.

  • How to get the array with in the array in plsql?

    Hi,
    I have a table contains the data like below strcture.
    LINE_NUMBER     TAG_NUMBER     NOTES     TORQUE_1     TORQUE_2     TORQUE_3
    1          SSS          SUCCESS     2000          3000          4000
    1          SSS          SUCCESS     4000          5000          6000
    1          SSS          SUCCESS     7000          4000          8000
    2          YYY          FAIL     200          300          400
    2          YYY          FAIL     400          500          600
    2          YYY          FAIL     700          400          800From the above table data line_number, tag_number and notes are the commom values for the particular line number. If you see the line number 1, we have three records torque values with different torque values for one line number. Now i have to create a stored procedure to store the line_number, tag_number and notes in one array then remaining torque column for another array. The output should be the below. The output will be for line number 1 is for array1 and remaining torque values for that lin number is another array2. The same line number 2 is will come in array1 and torque information of line number 2 is for another array2. This will be structure.
    Array_1 Count :2
    Array_2 Count :6
    1: LINE_NUMBER: 1: TAG_NUMBER: SSS, NOTES: SUCCESS
    1: TORQUE_1:2000, TORQUE_2:3000, TORQUE_3:4000
    2: TORQUE_1:4000, TORQUE_2:5000, TORQUE_3:6000
    3: TORQUE_1:7000, TORQUE_2:4000, TORQUE_3:8000
    2: LINE_NUMBER: 2: TAG_NUMBER: YYY, CUST_NUMBER: FAIL
    1: TORQUE_1:200, TORQUE_2:300, TORQUE_3:400
    2: TORQUE_1:400, TORQUE_2:500, TORQUE_3:600
    3: TORQUE_1:700, TORQUE_2:400, TORQUE_3:800Can anyone share with your thoughts?
    Thanks
    Edited by: orasuriya on Jul 10, 2009 10:33 AM

    Not sure why you need pl/sql
    WITH YOUR_TABLE AS
    SELECT 1 LINE_NUMBER, 'SSS' TAG_NUMBER, 'SUCCESS' NOTES, 2000 TORQUE_1, 3000 TORQUE_2, 4000 TORQUE_3 FROM DUAL
    UNION ALL
    SELECT 1,'SSS','SUCCESS',4000,5000,6000 FROM DUAL
    UNION ALL
    SELECT 1,'SSS','SUCCESS',7000,4000,8000 FROM DUAL
    UNION ALL
    SELECT 2,'YYY','FAIL',200,300,400 FROM DUAL
    UNION ALL
    SELECT 2,'YYY','FAIL',400,500,600 FROM DUAL
    UNION ALL
    SELECT 2,'YYY','FAIL',700,4000,800 FROM DUAL
    SELECT     DECODE (rn, 0, line_number, rn) || ':',
               col_val3,
               col_val2,
               col_val3
    FROM       (SELECT   0 rn,
                         line_number,
                         tag_number,
                         notes,
                         'LINE_NUMBER:' || line_number col_val1,
                         'TAG_NUMBER:' || tag_number col_val2,
                         'NOTES:' || notes col_val3
                FROM     your_table
                UNION
                SELECT   ROW_NUMBER ()
                           OVER (PARTITION BY line_number, tag_number, notes
                                 ORDER BY ROWNUM
                         line_number,
                         tag_number,
                         notes,
                         'TORQUE_1:' || torque_1,
                         'TORQUE_2:' || torque_2,
                         'TORQUE_3:' || torque_3
                FROM     your_table)
    ORDER BY   line_number, tag_number, notes, rn

  • How to get the refund with the RMA#?

    I have an RMA# from January 27th on a purchase of the photoshop product in which I inadvertently ordered 2 not one and as\ked for this to be cancelled so I could order one; this was all done on line and so far all I have is a note this is being processed, but it is still on the Visa account, I cannot find a number or anyway to contact a customer service rep; I am totally discouraged by your service, which is annoying at best since I did want to have this product. Your page is unusable.

    I Googled "adobe support chat", and got this:
    Adobe Connect Chat Support
    They should be able to direct you to the right person at Adobe.

  • How to get the Char with a code?

    I use function Asc to change a Char into an integer
    But which function can I use to undo it?
    eg.
    messagebox.show(Asc("A"))   'it shows 65
    messagebox.show(  *what can i use here* (65))   and it shows A ?

    I use function Asc to change a Char into an integer
    But which function can I use to undo it?
    eg.
    messagebox.show(Asc("A"))   'it shows 65
    messagebox.show(  *what can i use here* (65))   and it shows A ?
    Chr or ChrW, as shown here.
    Still lost in code, just at a little higher level.

  • HT4623 how  to get started connected with laptop with net connection but announcement is to try using wifi ,try again over mobile  please help me

    Sim card inserted in a new iphone 4s but iphone is not activated and announcing try using wi fi or try again over mobile please help?

    You can only sync to one computer/iTunes library. To make this your syncing computer:
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive: Apple Support Communities

Maybe you are looking for

  • Another user who can't use an Apple TV

    After much anticipation I managed to get my hands on an Apple TV 2 days ago. Unfortunately, I seemed to have joined the club of folks who can't seem to get their Apple TVs up and running (see elsewhere on this forum, e.g. http://discussions.apple.com

  • Internationalization for Chinese Language

    Hi All I need to impelement the chinese language in Swing components. I followed the INternationalization steps from Java tutorial. I have a property file which contains the necessary mapppings for the chinese equivalents of english words. <filename>

  • Problems understanding plugins?

    I'm new to this. I downloaded an aspect ratio converter plugin. It's from imovieplugins.com. I read in a discussion here that those dowloads are supposed to work in iMovie 6 and on the MacBook Pro. Mine does not work. Should everything sorta happen a

  • I lose the back button after a time (about 45mins). Any help?

    I lose my back button (upper left on tool bar) after about 45 minutes on line == This happened == Every time Firefox opened == several months ago

  • Incompatible webservice?

    I can't seem to get this webservice to work( http://www.maxmind.com/app/minfraud_soap_wsdl5 ), after working out the issue with omit on the optional parameters it is returning the following error: Cannot perform web service invocation minfraud_soap.