TimeZone.getDefault().getID() returning wrong value with JDK 1.5.0.06

Hi,
I faced a problem while fetching a time zone Id for the two different JDK version.
I was running following Class :
import java.util.TimeZone;
public class TimeZoneTest {
     public static void main(String[] args) {
          System.out.println("--------------------------------------------");
          System.out.println("Time Zone : " +TimeZone.getDefault().getID());
          System.out.println("--------------------------------------------");
When above code is executed with JDK 1.5.0.06, it was giving output as :
Time Zone : GMT+05:30
But same code when executed with JDK 1.5.0.22, it gives following output.
Time Zone : Asia/Calcutta
Can anybody please tell me is it a known bug in JAVA and in which version has it ben resolved.
Thanks,
Girish.

You shouldn't be using either of those versions. If there is a difference between them you will be entirely unable to get it resolved. Use a current JDK.

Similar Messages

  • Statvfs returns wrong values

    Hi,
    I am developing a program the will check for disk space (used,blocks, available ...) and i am using the statvfs.h file.
    When tested with small capacity disks (~5G) it works fine (compared to df -k).
    When tested with large capacity disks (~400G) it returns wrong values(compared to df -k).
    I am using f_bavail and i am casting from fsblkcnt_t to integer/long.
    Please help.
    Thanx R.

    Thanks for your answer.
    I have discovered that it (statvfs.h) doe's not work with vxfs, only with ufs.
    I am using Veritas Cluster Server.
    Any chance of an answer ??
    thanks,
    R.

  • Why TimeZone.getDefault().getID()) not equals run "date" command on linux?

    On linux, run date command and got the following output:
    #> date
    Tue Apr 1 09:58:37 CST 2008
    But java class got the Timezone is not correct.
    My class is below:
    import java.util.TimeZone;
    public class T {
            public static void main(String[]args) {
                    System.out.println(TimeZone.getDefault().getID());
                    System.out.println(TimeZone.getDefault().getDisplayName());
    }The out put is:
    #> java T
    US/Pacific
    Pacific Standard Time
    Could you help me?
    Edited by: kongxx on Mar 31, 2008 7:02 PM

    This should be os environment, if I following this steps((http://www.wikihow.com/Change-the-Timezone-in-Linux) ) to change system timezone, the TimeZone.getDefault() method return correct.
    Edited by: kongxx on Apr 1, 2008 7:38 PM

  • On Firefox stage.stageWidth stage.stageHeight return wrong values

    Hello,
    I have a problem on firefox windows 8, stage.stageWidth and stage.stageHeight return wrong values,
    swfobject.embedSWF("mySwf.swf", "mySwf", "500", "500", "14.0.0","expressInstall.swf", flashvars, params, attributes);
    on ie, Chrome stage.stageWidth and stage.stageHeight return 500
    on iFirefox stage.stageWidth and stage.stageHeight return 750 and my animation is smaller (66%)
    Thanks

    In order to target iPhone 5 you need to use AIR 3.5 beta or AIR 3.4
    pointing to iOS 6 SDK. Be sure to include the [email protected] to
    trigger the iPhone 5 size. In other words, the app has to be built
    targeting the iOS 6 SDK and have the new default png to trigger the full
    size on the iPhone 5.
    AIR 3.5 beta includes the bits that to target iOS 6 SDK, but you can
    target iOS 6 with AIR 3.4 by using the external SDK path in the package
    ANE prompt in FB 4.6
    http://labs.adobe.com
    iBrent

  • TimeZone.getDefault().getID() does not exist in your Oracle database table V$TIMEZONE_NAMES???

    Hi Everyone,
    My Jdev version is 11.1.2.3.0.
    I have developed many ADF applications in this version itself by setting time zone as -Duser.timezone="+05:30" and all were running fine.
    But Jdeveloper got crashed so i reinstalled the same version but now none of the applications are running.
    Its showing error as below:
    oracle.jbo.JboException: JBO-29112: The time zone 'GMT+05:30' defined in adf-config.xml or TimeZone.getDefault().getID() does not exist in your Oracle database table V$TIMEZONE_NAMES. Please set an available time zone in your TZ environment variable or user.timezone Java system property.
    What to do now?
    how will i know wat time zone should be set?
    please help the needful...
    Thanks.

    Check if www.jobinesh.com/2010/12/why-do-i-get-oraclejbojboexception-jbo.html helps.
    Timo

  • How can I return multiple values with PL/SQL Web Services

    Hi,
    I'm new to developping Web Services. I'm doing some tests with JDeveloper and OC4J on my local machine with a Web Services based on a PL/SQL function within a package. Right now that function only returns one value. So the xml response only has one output.
    I'd like to know how can I return multiple values with my PL/SQL Web Service. For example, if I want to return an employee's name and id? And that the xml contains two output : <employee>, <empid>?
    Reginald
    ps : I have searched the forum and I couldn't find an answer to this question, if that has been discussed AND answered before, can you please post the link? Thanks

    Alright, I actually found my answer. Since this was asked I think as a followup somewhere else I'll give my answer.
    It is very simple, all you have to do is create an Object Type and then Return that object type. After that, JDeveloper will take care of everything and you will have an xml response with multiple values. Here
    {color:#ff0000}
    create or replace TYPE person AS OBJECT
    ( id_interv number,
    first_name VARCHAR2(50),
    last_name VARCHAR2(50),
    date_birth date
    );{color}
    Then your function used in your Web Service should look something like this :
    {color:#ff0000}
    function info_emp (p_empno IN VARCHAR2) RETURN person AS
    l_emp person := person(-1,'','','');
    BEGIN
    SELECT first_name
    ,last_name
    ,emp_no
    INTO l_emp.first_name
    ,l_emp.last_name
    ,l_emp.emp_no
    FROM emp
    WHERE upper(emp_no) = upper (emp_no);
    {color}
    {color:#ff0000}
    RETURN l_emp;
    EXCEPTION WHEN NO_DATA_FOUND THEN
    l_emp := person (-1,'n/a','n/a','n/a');
    RETURN l_emp ;
    END info_emp;{color}
    {color:#ff0000}{color:#000000}After that, this is what the xml response looks like :{color}{color}
    &lt;first_name xsi:type="xsd:string"&gt;John&lt;/first_name&gt;
    &lt;last_name xsi:type="xsd:string"&gt;Doe&lt;/last_name&gt;
    &lt;emp_no xsi:type="xsd:string"&gt;0250193&lt;/emp_no&gt;

  • When orientation change and soft keyboard is activated, return wrong value

    Hello,
    in a View, when the orientation change and the soft keyboard is activated, this.navigator.height return wrong value.
    systemManager.stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, orientationChangeHandler);
    public function orientationChangeHandler(event:StageOrientationEvent):void {
    inp.text=String(this.navigator.height);
    thanks.

    Can you attach a simple sample application that demonstrates this?  What device are you seeing this issue on?

  • NI PCI-6602: semi-period measurement stops unexpectedly or returns wrong values

    Hi,
    Using an NI PCI-6602 card we try to measure the semi-periods of a digital signal.
    In "continuous sampling mode", 10 samples are collected in the buffer and then are read
    out.
    Up to 6 counters on this card are sampling the same signal in our testing configuration.
    Here we found these issues:
    1. Failure
    In principle, the measurement runs correctly, but one or more counters sporadically may
    suffer a complete failure. I.e. these counters don't provide samples anymore.
    Only after stopping and restarting the assigned task, a failed counter works again.
    Apparently, a counter failure is most likely to happen when
        - the sampled signal "changes", i.e. when the pulse width of the signal changes,
        - or when the computer load is high, e.g. when opening a window of another application.
    Every counter occasionally failed, but the issue was found very often at counter 1 of
    the PCI-6602 card, if we used counters 0 through 5 in parallel.
    Using another PCI-6602 card, the failures happened preferably on counters labeled "near"
    number 5.
    2. Wrong values
    Occasionally the "interpretation" of the sampled values changes, i.e. the length of the
    "high level" period is returned, where the "low level" period length should be given, and
    vice versa.
    This is our task configuration:
    Configuration done with MAX:
    Signal input range:    2 usec - 2 sec
    Custom Scaling:        None
    Sample mode:        continuous
    Buffer size:        10 Samples
    In addition these calls are made:
    ret = DAQmxSetDigEdgeArmStartTrigSrc( task->mHandle, <use the same terminal as is used for
    the signal to be measured>);
    ret = DAQmxSetArmStartTrigType( task->mHandle, DAQmx_Val_DigEdge);
    ret = DAQmxSetDigEdgeArmStartTrigEdge( task->mHandle, DAQmx_Val_Rising);
    ret = DAQmxSetCISemiPeriodStartingEdge( task->mHandle, <the channel>, DAQmx_Val_Falling);
    Best regards
    Manfred

    Hi Manfred7,
    did you already test this behaviour with a simple example from us?
    Just go through the example database and try the examples there.
    These examples should work. 
    If it works, there is a problem with your programm.
    If it won't work, please tell me more about your software:
    - Version
    - DAQmx Version ,...
    best regards
    Dippi 

  • Datasocket return wrong value

    Hello Everyone:
    I am using datasocket to communicate with an opc server.I built a quite simple vi to test the communicaion as you see in the picture.If I highlight the execution I got the right return value( a boolean type indicator),but I run it normally I get the wrong value.The quality of the datasocket read vi display 0.Meanwhile if I add a while loop outside the datasocket read vi,then I get the right value again.I only want to read the opc tag once,do not want to add the while loop in this vi.What should I do?please help me.Thank you very much!

    你先尝试在DataSocket read vi的输入节点加入延时(根据实际应用调节下延时长短)。
    Li Yi

  • Wrong value with calculated item in pivot table

    I have a report with 4 columns:
    First Column are Department Dimension
    Second Column is Actual value
    Third Column is Previous value
    Four Column is: ((Actual Value-Previous Value)/Previous Value))*100 that called Var
    Then I do a pivot table and I have new calculated item: Department1/Department2 and I have wrong value in four column:
    Department----------------------------------Actual-------Previous------Var
    Dept1------------------------------------------18503--------16308--------13,5
    Dept2-------------------------------------------3758---------3518----------6,8
    (Calculated Item: Dept1/Dept2)--------4,92---------4,64------------*2* <---- This value is wrong...and it has to be: 6,03
    Is possible to get the correct value???
    Thank you very much!

    hi,
    Create a logical column with ur calculation formula and make it as default agg rule in rpd and answers change it to server determined/server complex agg.I did the same it was working fine for me!!
    Check this link
    http://books.google.com/books?id=OnbYrkWa4RsC&pg=PA74&lpg=PA74&dq=%22server+complex+aggregate%22&source=web&ots=qxrpaFXmo2&sig=CxLOemzcOlvIiaQ_sQD4fPQotdM&hl=en&sa=X&oi=book_result&resnum=5&ct=result#v=onepage&q=%22server%20complex%20aggregate%22&f=false
    thanks,
    saichand

  • Context Type Search returning wrong results with "ME" in the SEARCH

    CREATE TABLE "TEST"
    id NUMBER(19) NOT NULL,
    "TESTDATA" CLOB NOT NULL ENABLE
    CREATE INDEX IX_testdata ON test (testdata) INDEXTYPE IS CTXSYS.CONTEXT ONLINE
    PARAMETERS ('TRANSACTIONAL MEMORY 500M SYNC(ON COMMIT) section group ctxsys.xmlpathgroup')
    PARALLEL 4
    insert into test values (1, '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <user>
    <givenname>victor</fn>
    <surname>frandenstein</sn>
    </user>
    select * from TEST
    where
    contains(testdata,
    'me inpath(/user/givenname) &(victor inpath(/user/givenname))') > 0
    This should not result in any results but it does show the record out.
    What is it we have to do deal with the word "ME". It works fine for any other values.

    Since "me" is a default stopword, searching for "me" and "Victor" is like just searching for "Victor", so it returns the row with "Victor" in it. If you want to be able to search for "me", then you need to either remove "me" from your existing ctxsys.default_stoplist using ctx_ddl.remove_stopword or specify another stoplist during index creation that does not contain me or an empty stoplist. You will need to drop and recreate your index after changing or modifying stoplists in order for the changes to take effect. Please see the demonstration below. I have added a couple of rows so that it is clearer what is and is not returned. You can check the token_text column of your dr$...$i index to see what it is tokenized, indexed, and searchable.
    SCOTT@10gXE> -- test environment:
    SCOTT@10gXE> CREATE TABLE "TEST"
      2  (
      3  id NUMBER(19) NOT NULL,
      4  "TESTDATA" CLOB NOT NULL ENABLE
      5  )
      6  /
    Table created.
    SCOTT@10gXE> insert into test values (1, '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      2  <user>
      3  <givenname>victor</fn>
      4  <surname>frandenstein</sn>
      5  </user>
      6  ')
      7  /
    1 row created.
    SCOTT@10gXE> insert into test values (2, '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      2  <user>
      3  <givenname>me victor</fn>
      4  <surname>frandenstein</sn>
      5  </user>
      6  ')
      7  /
    1 row created.
    SCOTT@10gXE> insert into test values (3, '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      2  <user>
      3  <givenname>naren</fn>
      4  <surname>frandenstein</sn>
      5  </user>
      6  ')
      7  /
    1 row created.
    SCOTT@10gXE> exec ctx_ddl.create_section_group ('xmlpathgroup', 'PATH_SECTION_GROUP')
    PL/SQL procedure successfully completed.
    SCOTT@10gXE> -- reproduction:
    SCOTT@10gXE> CREATE INDEX IX_testdata ON test (testdata) INDEXTYPE IS CTXSYS.CONTEXT
      2  PARAMETERS
      3    ('TRANSACTIONAL MEMORY 500M
      4        SYNC(ON COMMIT)
      5        section group xmlpathgroup')
      6  PARALLEL 4
      7  /
    Index created.
    SCOTT@10gXE> SELECT token_text FROM dr$ix_testdata$i
      2  /
    TOKEN_TEXT
    FRANDENSTEIN
    NAREN
    VICTOR
    givenname
    surname
    user
    6 rows selected.
    SCOTT@10gXE> select * from TEST
      2  where
      3  contains(testdata,
      4  'me inpath(/user/givenname) &(victor inpath(/user/givenname))') > 0
      5  /
            ID
    TESTDATA
             1
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <user>
    <givenname>victor</fn>
    <surname>frandenstein</sn>
    </user>
             2
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <user>
    <givenname>me victor</fn>
    <surname>frandenstein</sn>
    </user>
    SCOTT@10gXE> -- solution:
    SCOTT@10gXE> drop index ix_testdata
      2  /
    Index dropped.
    SCOTT@10gXE> CREATE INDEX IX_testdata ON test (testdata) INDEXTYPE IS CTXSYS.CONTEXT
      2  PARAMETERS
      3    ('TRANSACTIONAL MEMORY 500M
      4        SYNC(ON COMMIT)
      5        section group xmlpathgroup
      6        stoplist ctxsys.empty_stoplist')
      7  PARALLEL 4
      8  /
    Index created.
    SCOTT@10gXE> SELECT token_text FROM dr$ix_testdata$i
      2  /
    TOKEN_TEXT
    FRANDENSTEIN
    ME
    NAREN
    VICTOR
    givenname
    surname
    user
    7 rows selected.
    SCOTT@10gXE> select * from TEST
      2  where
      3  contains(testdata,
      4  'me inpath(/user/givenname) &(victor inpath(/user/givenname))') > 0
      5  /
            ID
    TESTDATA
             2
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <user>
    <givenname>me victor</fn>
    <surname>frandenstein</sn>
    </user>
    SCOTT@10gXE>

  • Registry calls return wrong values - how to fix?

    Here is the code used to open the key (all the variations shown produce the same behaviour)
    bool Win32_OpenKey( const HKEY uPlaceInRegistry, HKEY& xKey, const char* const szKeyName, const bool bReadOnly = false )
    // SE: make sure key exists
    // SE - NOTE: this is deprecated. it worked fine, but suddenly doesnt :(
    // so i have replaced it with the following line
    //const bool bOpened = RegOpenKey( uPlaceInRegistry, szKeyName, &xKey ) == ERROR_SUCCESS;
    const bool bOpened = RegOpenKeyEx( uPlaceInRegistry, szKeyName, 0,
    bReadOnly ? KEY_QUERY_VALUE : KEY_ALL_ACCESS, &xKey ) == ERROR_SUCCESS;
    bool bCreated = false;
    if( !bOpened )
    // SE - NOTE: this is deprecated. it worked fine, but suddenly doesnt :(
    // the Licensor will create keys except in the case where we upgrade a user from
    // an old license... so now using the Ex version in hopes it magically works.
    //bCreated = RegCreateKey( uPlaceInRegistry, szKeyName, &xKey ) == ERROR_SUCCESS;
    DWORD uDisposition = -1;
    bCreated = ( RegCreateKeyEx( uPlaceInRegistry, szKeyName, 0, 0,
    REG_OPTION_NON_VOLATILE, bReadOnly ? KEY_QUERY_VALUE : KEY_ALL_ACCESS,
    0, &xKey, &uDisposition )
    == ERROR_SUCCESS );
    return bOpened || bCreated;
    Here is where the values are queried.
    unsigned int uMagic = 0;
    unsigned long uType = 0xFFFFFFFF;
    unsigned long uSize = sizeof( unsigned int );
    //long err = RegGetValue( xKey, 0, "Magic", RRF_RT_DWORD, &uType, &uActivated, &uSize );
    uType = REG_DWORD;
    long err = RegQueryValueEx( xKey, "Magic", 0, &uType, reinterpret_cast< LPBYTE >( &uMagic ), &uSize );
    if( (err == ERROR_SUCCESS) && ( uType == REG_DWORD ) && ( uSize == sizeof( unsigned int ) ) )
    unsigned long long ullReadStartDate = 0;
    uSize = sizeof( unsigned long long );
    err = RegGetValue( xKey, 0, "Number", RRF_RT_QWORD, &uType, &ullReadStartDate, &uSize );
    if( (err == ERROR_SUCCESS) && ( uType == REG_QWORD ) && ( uSize == sizeof( unsigned long long ) ) )
    The values that are returned do not match the registry.
    In fact the values returned are values that we never would have written either. The zero is fishy because maybe it indicates bad behaviour. The messed up time_t value is even more confusing... it comes from a more than 30 days ago, which is around the time
    when I first started working on this code.
    To make a guess I am getting back an ancient version of the key values which is somehow preserved and accessible but can not be seen in regedit. I have no idea why this is suddenly happening either - this code (before my commented changes were made) worked
    exactly as expected for a few weeks now.
    Slightly unrelated but it also seems that a standard user can not write to HKCU in our repeatable tests. This seems slightly crazy as well... should I just not be using the registry? It never seemed like a good idea, but I have done it to try and fit the
    platform way of doing things after hitting lots of problems with naive use of files...

    thanks for the tips. will probably come in handy in the future. :)
    it turned out to be permissions and bad documentation in my case. the virtual store thing was not writing to where the docs say it should, and so something was lingering somewhere i couldn't find in the right place under any of the top level registry keys.
    maybe there is some other place where it has gone in the registry that i am just not finding the documentation for...
    my ultimate fix was to use a file in ProgramData :)
    I figured I'd try and do it 'the MS way' and use the registry. what a terrible idea that turned out to be, since I guess its no longer the MS way given how riddled with backwards compatibility hacks it seems to be...

  • Applescript returns incorrect value with blank cell

    Imagine there is a column of numbers, some which might have the value 0.0 and some which are blank. Imagine wanting to append a data set at the first blank cell using Applescript. As Applescript is currently implemented in Numbers, this is not possible. See the following test.
    1. In Numbers, create a new blank spreadsheet.
    2. Select cell "A1".
    3. Format as text.
    4. Execute the following line of Applescript,
    tell application "Numbers" to get value of cell "A1" of table 1 of sheet 1 of front document
    It returns "0.0".
    I would expect a return "" since it is a empty cell formated as text, no less.
    Because of this, there is no way to find a blank cell since a blank cell returns a value of 0.0 which might be a valid entry.
    Anyone have any ideas for a work around?

    The value of a blank (empty) cell IS zero.
    The value of a cell containing a string whose length is zero contains "".
    Given that, I will post a report because I'm not sure than the value returned in AppleScript is the good choice.
    In AppleWorks for a blank cell, the returned value was "".
    Yvan KOENIG (from FRANCE dimanche 11 janvier 2009 16:31:35)
    +Your tracking number for this issue is Bug ID# 6487875.+
    Hello
    +(1) May I know if the fact than+
    +set v to value of cell "B12"+
    +returns 0.0 when the cell is blank is the designed result.+
    +In AppleWorks in this case, we are accustomed to get an empty string.+
    +(2) In version 1, a cell containing an empty string was accepted in an arithmetic operation.+
    +In version 2, it is rejected.+
    +Is it a design choice or is it a bug ?+
    +Your tracking number for this issue is Bug ID# 6487879.+
    Hello
    +In Numbers, as long as we are referencing cells of the current row (200 for instance), we may use short references like:+
    =(BC)*(DE)
    +When we save as iWork '08 document, the formula is expanded as+
    =(B200C200)*(D200E200)
    +Is it a design choice or a bug ?+

  • How to return a value with a try block?????????

    hi there
    if a method needs to return a value, but there maybe an exception caught in a try block, where should i place the return statement, outside the try bccok or inside
    code...
    public String readFrom()
    String temp;
    try
    temp = br.readLine();
    catch (IOException ex)
    System.out.println(ex);
    return temp;
    }

    It should be coded as you have it. There should (ideally)
    be only one exit point from a method. If an exception is
    thrown, the code in the catch block will be executed and
    processing will continue. You can use the catch block
    to set the value of the variable that is being returned to
    indicate that an error has occurred. In your example,
    you could set the String temp to null.
    Mark

  • ABAP-based web service returns numeric values with leading zeros

    Hi SOA experts,
    I have created a web service out of an ABAP function module. Beside other values, this service returns a list of document numbers. All of these numeric values are returned by the web service with leading zeros, but we do want these values w/o leading zeros.
    Any ideas how I can tell the web service to not print any leading zeros?
    Thanks in advance for your help!
    Kind regards, Matthias
    PS: The according function module does not print any leading zeros for the numeric values

    hi,
    just a guess: I'd try to use I instead of NUMC for the document numbers.
    NUMC is no number but a character string with numeric characters only. only some display routines in SAP know that this string of numerals represents a number and omit leading zeroes.
    my 2 cents,
    anton

Maybe you are looking for

  • Windows 7 64 bit apps crashing, dde server error

    Hi, I am having problems with a new Windows 7, 64 bit system. Acrobat 9 frequently crashes programs when it's invoked, for instance when trying to print a web page to PDF from Firefox, or making a PDF from a Word document. Firefox or Word will crash,

  • Credit Check at Ship to Party Level

    Hi Mark My Client requirement is do Credit Check at Ship to Party level. How can we achieve Credit Check at Ship to Party. Please explain. Thanks Rajanikanth

  • Cannot edit iTunes tags

    It appers that a fair number of my itunes music files can no longer be edited, ie the tag metadat is greyed out. I think that this has happened since creating a new smaller library to use with itunes match and thn reopening my older much larger (80,0

  • Garageband iPad midi editor doesn't display all the sounds that I used

    I used a Korg nano keyboard to record some drums into Garageband using Garageband's own drums. But somehow the snaredrum that I both hear and see in the overall editor is not dislpayed in the drum midi-editor. This renders me unable to edit my snared

  • Scriptlet objects scope

    Hello, I would like to be sure of one thing (arguing with someone ...) : I assume that objects declared in scriptlets are of page scope. Can somebody assure me on this ? Thank you,