Java always returns 15 minutes greater than the current time.

Hi,
I am using Microsoft Windows Server 2003R2,Standard X64 edition with Service Pack 2 and jdk1.6.0-03.
Java always returns time 15 minutes greater than the current system time.
eg:
SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
System.out.println("Now time: "+simpleDateFormat.format(new Date()));
System.out.println("Now time: "+new Date());The output of the program is :
Now time: 2008-12-22 18:47:04
Now time: Mon Dec 22 18:47:04 NPT 2008
When my actual system time is 6:32 PM or (18:32)
I have checked the current time with other programming languages like python and it always returns the actual date and time.
Note: To my observation java is always utilizing a time which is 15 minutes greater than the current time even for its log.
Thanks,
Rajeswari (Msys)

I think a more practical time machine would be one that actually travels back in time rather than forward (by 15 minutes). Sounds like it needs some more work.
Anyway, I suggest changing the system time on your computer to some other value (say, 2 hours ahead), then running the program again. If its off by 2 hours and 15 minutes, its getting the time from your computer. However, if its still off by only 15 minutes (from your wristwatch's time), then its getting the time form somehere other than the computer clock.

Similar Messages

  • I have managed to sync my iPhone 4 to my btyahoo calendar with caldav.  All entries appear on the phone calendar on the correct date, but the time given is always 5 hours later than the (correct) time on the computer. How can I rectify this?

    Why do the times for each event or appointment appear on the phone calendar exactly 5 hours later than the correct times entered into the Yahoo calendar on my P.C?  Is there a way of rectifying this, either on the Yahoo calendar site, or on the iPhone?

    You got the new iphone?????   I have same problem.  I transferred audiobooks to device to find no audiobooks on device (despite it being in iTunes as if it was).  Have you found a solution?????   I even tried to change import settings on format transfer but hasn't worked. 

  • The Version number can't be greater than the current version number

    Hi,
    We are executing SSIS JOB from 2008R2 server, what the job do is it pulls the data from SQL 2012 Server. During this process we got the attached error found, please help me how to troubleshoot this.
    Also
    We have ownership issue with the Hyperion output files that are created at Shared location
    since User 1 will be executing the package manually and it is also running as a scheduled job on the SSIS server.  When the scheduled job creates the file, the previous/existing extract file will be owned by the SQL Agent account.  When User1 executes
    the package manually it will fail because it will run under User1's credentials and will not overwrite the existing file which is owned by SQL Agent.
    The same will occur in the opposite case where User 1 has run the process manually and the existing output file is owned by him – then the scheduled job will fail because the SQL Agent account will not overwrite/delete User1's file.
    Could you please tell me guys how to sort it out this issue?
    Thanks
    DBA

    Any other error preceeding to the error you attached?
    You may try using command which will use SQL 2012 DTExec version and provide SSIS package path there.
    SQL Job with CmdExec and command like below:
    C:\Program Files\Microsoft SQL Server\110\DTS\Binn\DTExec.exe /F "c:\packagepath\packagename.dtsx"
    Ownership issue:
    Is the logic correct in SSIS package? Does it check if there is any existing file, if yes then update/delete so on...
    Cheers,
    Vaibhav Chaudhari
    [MCTS],
    [MCP]

  • Getting the current time and comparing it to a time in the future

    Hello,
    I am seeing in my research some debate on the best way to get the time. I am reading that just using the Date class and calling getTime() is not the most reliable way to do things. Overall, I am trying to get the current time down to the millisecond. I then want to add 5 seconds to that time and then store that value. FInally, when the current time is greater or equal to this stored value, I want to continue on in my program. Can anyone point me in the right direction on how to calculate the time variable? Any help would be much appreciated. I am new to the JAVA world.
    Thanks,
    Tim

    To store the current time, simply use new java.util.Date(). Yes, there might be slight inconsistencies and it might not be the most accurate time possible, but without significant additional effort (perhaps a native O/S call or the use of another time library), you will not do much better. Calendar won't help in this instance either. The easiest way to get five seconds in the future is to do the following:
    Date now = new Date();
    Date future = new Date(now.getTime() + 5000);To store and retrieve the value, it depends on what you are doing. You can place it in the database via JDBC (BTW, if you trust the database timestamp more than Java's you can use something like Oracle's SYSDATE instead of Java's date in your SQL query). You can place it in the filesystem. You can store it in the user's session.
    - Saish

  • Running a java program in a directory other than the current directory

    How do I run a java program that's located in a directory other than the current directory?
    There is a file Test.java in /dir1/subdir1. If my current directory is anywhere other than that directory, say /dir2/subdir2, I can compile Test.java by using:
    javac -classpath /dir1/subdir1 /dir1/subdir1/Test.java
    But when I try to run it with:
    java -classpath /dir1/subdir1 /dir1/subdir1/Test
    I get a java.lang.NoClassDefFoundError: \dir1\subdir1\Test
    Any thoughts?

    You need to specify just the name of the class you want to run. So java -classpath /dir1/subdir1 Test

  • Increasing maximum number of Logical Processors in a Processor Group greater than the default (64)

    Can the maximum number of Logical Processors allowed in a Processor Group be increased by Bcdedit command or registry key to a number greater than the default (64) to allow non-group-aware applications to seamlessly scale via multithreading across more cores
    MSDN documents methods to reduce the max number of LP's in a Processor Group to 1 or any power of 2 less than 64 in order to increase the number of Processor Groups.  But there is no discussion of how to increase the maximum number of Logical Processors
    allowed in a Processor Group to a number greater than the default (64), e.g. to 128 or 256. 
    Since a non-group-aware application/process can only run on 1 Processor Group, increasing this limit is needed to allow non-group-aware multithreaded applications to scale seamlessly for parallel computation across more than 64 cores simultaneously on systems
    with more than 64 cores (for example, a quad-socket Intel Xeon system with 24 cores per socket, including true and hyper cores).  If that limit can be set via registry key or command line, or if there is another way to force all the cores on
    all 4 sockets (4 NUMA nodes in this case) to join in 1 Processor Group, then non-group-aware applications will not need to be rewritten using group-aware thread-affinity APIs.  

    Hi John,
    Are you trying to specify a static NUMA-node-to-group assignment, rather than letting Windows dynamically assign NUMA nodes to groups at boot time? If yes, You can refer the
    following related KB:
    How to manually configure K-Group assignment on multiprocessor machines
    http://support.microsoft.com/kb/2506384
    Systems with fewer than 64 logical processors always have a single group, Group 0. On systems with 64 or fewer processors, existing applications will operate correctly without
    modification. Applications that do not call any functions that use processor affinity masks or processor numbers will operate correctly on all systems, regardless of the number of processors. To operate correctly on systems with more than 64 logical processors,
    the following kinds of applications might require modification:
    •Applications that manage, maintain, or display per-processor information for the entire system must be modified to support more than 64 logical processors. An example of
    such an application is Windows Task Manager, which displays the workload of each processor in the system.
    •Applications for which performance is critical and that can scale efficiently beyond 64 logical processors must be modified to run on such systems. For example, database
    applications might benefit from modifications.
    •If an application uses a DLL that has per-processor data structures, and the DLL has not been modified to support more than 64 logical processors, all threads in the application
    that call functions exported by the DLL must be assigned to the same group.
    By design, a non-NUMA computer is considered to have one NUMA node. Because NUMA nodes cannot span groups, the system creates a node for each group after you restart the computer.
    The related KB:
    Processor Groups
    http://msdn.microsoft.com/en-us/library/windows/desktop/dd405503(v=vs.85).aspx
    More information:
    Uneven Windows Processor Groups
    http://blogs.msdn.com/b/saponsqlserver/archive/2011/10/08/uneven-windows-processor-groups.aspx
    Boot Parameters to Test Drivers for Multiple Processor Group Support
    http://msdn.microsoft.com/en-us/library/windows/hardware/ff542298(v=vs.85).aspx
    I’m glad to be of help to you!
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Getting the current time using java.sql.Time

    I need to set the current time in a database field. I tried the following code (using my logic) to set the current time. But, I end up getting "Jan 1, 1970" in the time field in the database.
    Here is the code :
    Calendar cal = Calendar.getInstance();
    Java.sql.Time now = java.sql.Time.valueOf(
              cal.get(Calendar.HOUR_OF_DAY) + ":" +
              cal.get(Calendar.MINUTE) + ":" +
              cal.get(Calendar.SECOND));
    What should I do to get the current time in the "now" variable? Right now, it ends up in the database as "Jan 1, 1970".
    Thanx in advance.

    Can you show me the code to do SimpleDateFormat?
    Assuming that I use the following skeleton to get the
    time value from the database, can you show me the
    code for the missing link (so as to display in the
    format "hh:mm:ss") ?
    java.sql.Time timeFromDb =
    obj.getActionTime();
    // The above code gets the "time" field from
    the database into "timeFromDb"
    // Use SimpleDateFormat to display the time
    java.text.SimpleDateFormat sdf = new
    java.text.SimpleDateFormat("hh:mm:ss");
    // Now what do I do with "sdf" and
    "timeFromDb" ?
    // Print out the time value
    System.out.printf("Time is : %s\n",
    .... );Hi,
    I don't know if you want 24h clock or not. This is the pattern for 24h clock.
    "HH:mm:ss"
    You get the text string by calling sdf.format(timeFromDb)
    Kaj

  • Error Message FF747  -The tax amount must not be greater than the tax base

    Hello,
    We are attempting to post an import vendor invoice through transaction    FB60 for Israel company code . Since the tax charged by the vendor is not fixed every time , we are entering the tax amount in the    FB60 screen manually , without selecting 'calculate tax'.The amount of tax is greater than the amount of expense as per the real business scenario. For example amount of expense is 100, amount of tax is 200 and the total amount charged by the vendor is 300 .However when we simulate the posting we get an error - The tax amount must not be greater than the tax base-Message no. FF747
    We tried putting a very high percentage in the tax code also but it didn't help
    We would like to go ahead with this posting. Could you pl throw light on the same . ? Is there any way (OSS note ) or a work around which can resolve the issue ?
    Best Regards
    Amit  Kulkarni

    Hello
    This may be  a work around in other cases , but since we want the amount to be updated in the BSET table for further VAT reports , we would like  this to be posted along with the expense item

  • The tax amount must not be greater than the tax base

    Hi Experts,
    User is trying to "Relase to Account" in t-code VF01 he is getting an error message The tax amount must not be greater than the tax base.
    During Debuging i found the error is raised in Function module      RV_ACCOUNTING_DOCUMENT_CREATE
    Message raised is
    Message Class : FF
    Message number: 747
    Mesage "The tax amount must not be greater than the tax base"
    Request to through some lights on this issue.
    Reagrds
    Sree

    Hi,
    did you check SAPNET notes with "VF01" and the message class/number as search terms. There are some notes dealing with this case eg 872449, and 184985.
    Best regards, Christian

  • SAP Table index size is greater than the size of the actual table

    Hello Experts,
    We are resolving an issue related to database performance. The present database size is 9 Terabytes. The analysis of response times through ST03N shows that the db time is 50% of the total response time. We are planning to reorganize the most updated tables (found from DB02old tx).
    Here we see that the size of the index for a table is greater than the actual size of the table. Is this possible, if yes then how can we reorganize the index as it does not allow us to reorganize the index using brspace command.
    Hope to hear from you soon, and if any additional activities you can suggest to improve the performance of the database will be appreciated.
    Thank you

    Hi Zaheer,
    online redef may help you (for a little while) , but also check WHY the index became fragmented.
    Improper settings can bring the index fragmented again and you have reoccuring reorg needs.
    i.e.
    check if PCT_INCREASE >0 if you are using Dictionary Managed Tablespaces or locally managed tablespaces  that uses a "User" allocation policy. Set it to 0 to generate uniform next extents in the online reorg.
    select
                SEGMENT_NAME,
                SEGMENT_TYPE,
                round((NEXT_EXTENT*BLOCKS)/(EXTENTS*BYTES))*(BYTES/BLOCKS),
                PCT_INCREASE
            from
                DBA_SEGMENTS
            where
                OWNER='SAPR3'
            and
                SEGMENT_TYPE in ('INDEX',
                                'TABLE')
            and
                PCT_INCREASE > 0
            and segment_name in ('Yourtable','Yourindex')
    In the following cases, it may be worthwhile to rebuild the index:
         --> the percentage of the space used is bad - lower than 66%: PCT_USED
         --> deleted leaf blocks represent more than 20% of total leaf blocks: DEL_LF_ROWS
         --> the height of the tree is bigger than 3: HEIGHT or BLEVEL
    select
      name,
      '----------------------------------------------------------'    headsep,
      'height               '||to_char(height,     '999,999,990')     height,
      'blocks               '||to_char(blocks,     '999,999,990')     blocks,
      'del_lf_rows          '||to_char(del_lf_rows,'999,999,990')     del_lf_rows,
      'del_lf_rows_len      '||to_char(del_lf_rows_len,'999,999,990') del_lf_rows_len,
      'distinct_keys        '||to_char(distinct_keys,'999,999,990')   distinct_keys,
      'most_repeated_key    '||to_char(most_repeated_key,'999,999,990') most_repeated_key,
      'btree_space          '||to_char(btree_space,'999,999,990')       btree_space,
      'used_space           '||to_char(used_space,'999,999,990')        used_space,
      'pct_used                     '||to_char(pct_used,'990')          pct_used,
      'rows_per_key         '||to_char(rows_per_key,'999,999,990')      rows_per_key,
      'blks_gets_per_access '||to_char(blks_gets_per_access,'999,999,990') blks_gets_per_access,
      'lf_rows      '||to_char(lf_rows,    '999,999,990')||'        '||+
      'br_rows      '||to_char(br_rows,    '999,999,990')                  br_rows,
      'lf_blks      '||to_char(lf_blks,    '999,999,990')||'        '||+
      'br_blks      '||to_char(br_blks,    '999,999,990')                  br_blks,
      'lf_rows_len  '||to_char(lf_rows_len,'999,999,990')||'        '||+
      'br_rows_len  '||to_char(br_rows_len,'999,999,990')                  br_rows_len,
      'lf_blk_len   '||to_char(lf_blk_len, '999,999,990')||'        '||+
      'br_blk_len   '||to_char(br_blk_len, '999,999,990')                br_blk_len
    from
      index_stats where index_name = 'yourindex'
    bye
    yk

  • Goods receipt date should be greater than the P.O. date

    Hi
    Is there any option to control the Goods receipt date should not be lesser than the P.O.Date??
    Eg: P.O. is raised in 10.1.9, User should not do the GRN before 10.1.9. In which way we can control  this???
    Regards
    Ravi

    Dear,
    You have to include User exit in MIGOwhich will trhrow an error at the time when Goods receipt date is greater than the P.O. date.
    Regards
    Utsav

  • Currency  IDR  becomes greater than the maximum price

    Dear All
    We have error message (no 06217), when create PO, like bellow :
    =================
    Net price in IDR becomes too large
    Message no. 06217
    Diagnosis
    The calculated net price in currency IDR becomes greater than the maximum price ("99999999999") defined in the system.
    Procedure
    Make sure your entries are correct.
    Check the following:
    The exchange rate, if the currency differs from the local currency;
    The conversion order unit --> order price unit.
    ==================
    Would you like help me please
    thanks
    imron

    Hello,
    The PO value in IDR currency is larger than the maximum length the SAP field and hence the error message. Either your order currency or your company code currency must be IDR in the PO and the total order value is exceeding the technical field length limitation in SAP.
    The best way ahead would be to break down the PO line into different purchase orders.
    Regards
    Greg

  • COMPAQ presarioc700 my lap showing that MBR nomber is greater than the BIOS nomber

     when am  trying to start my laptop it saying that some MBR no is greater than the BIOS nomber and after that its taking time and up to click enter and sometimes its giving sound like a crack, and when am trying to update my bios in that its not showing my OS presently am using WINDOWS7,is there require to update bios or what should i do please help thank u

    Hi SURESH13,
    Welcome to the HP Forums! I see that you are having some problems with your Master Boot Record. I have included a link to a third-party site that will show you how to fix the MBR corruption.
    Thank you,
    Please click “Accept as Solution ” if you feel my post solved your issue.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Thank you,
    BHK6
    I work on behalf of HP

  • How to zero the values that are greater than 0 at time 0?

    Hello, New user,
    I would like to know how to zero values that are greater than 0 at time 0.  I am totalizing gas flow and understand how not to add the negative numbers but am unsure about the positive numbers at 0 flow.  I hope I have explained this good enough.
    Thank you,
    Lisa

    I don't understand why the value which should be 0 is actually greater than 0.
    How do you determine that the value should be 0, such as no flow, even if the value is greater than 0?
    Ryan Shi
    Hello Ryan,
    The system itself may have an offset of 0.1 V which in the program is related to flow.  I do not wish to add this .1 as flow.  I want to beable to reset the values to 0 and then when there is flow, to add the flow.   If you purchase a program from some vendors you can zero the channel, that is my goal.  I want this to be automatic when a switch is pressed.  Such as:  for 20 seconds, average channel, and use that value as 0 flow then add flow??   I was told averaging may work??
    Thank you again,
    Lisa Williamson

  • "Reversal value greater than the  value invoiced to date" error

    Hi all,
    I have a scenario.  there is a invoice which we tried to reverse through MR8M. But it was not successful. Now , as a alternative solution I am trying to book credit memo. There were two line items in the PO.  When I try to book Credit memo, the system throws error "Reversal value greater than the  value invoiced to date" only for line item 2. Line item 1 is perfectly OK. Any suggestions why this is happening ? If it would have been exchange rate problem then I think the error should be for both the line items.
    Regards,
    Vivek

    Hi,
    You told that youtr PO is having two line utems and you are trying to post the credit memeo for the two line items.
    Does your po is invoiced for the two line items ?
    if the second line item is not posted with any invoice , while posting credit memo to second line item system will give this error.This is one scenario.
    May be you would have wrongly entered the values ?
    There could have been already reversed or posted the credit memo for then second line item .
    check whather you are posting any subsequent posting ?
    Regards,

Maybe you are looking for

  • Airplay mirroring boxed

    ipad2 ios5 atv2 ios 4.4 airplay mirroring works to viera hdtv, however the display is not in widescreen, it is boxed. please assist thanks, Jeremy

  • IPad Syncing iMovie to iTunes

    When you sync or "send" an imovie from the iPad to iTunes.  Where does it go.  I've got home sharing turned on on my laptop (macbook Pro 10.7.3. - iPad is iPad 3ver. 5.1). 

  • Is it possible to use a case statement when joining different tables based on input parameters?

    Hi, I have a scenario where my stored procedure takes 5 parameters and the users can pass NULL or some value to these parameters and based on the parameters, I need to pull data from various tables. Is it possible to use a case statement in the join,

  • Side Effects of Upgrading to SP5 from SP4 in XI

    What are the Side Effects of Upgrading to SP5 from SP4 in XI

  • Playhead issue

    How do i synchronize the playhead in the viewer with the playhead on the time line. I have selected in the viewer a sound clip. I found exactly the spot i want to split the clip but the playhead in the timeline hasnt moved to the same spot - hence th