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

Similar Messages

  • 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

  • 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.

  • Execution timed out error when running opcagt command on linux server with agent 11.12.009 installed

    Hi,
    Can anyone help me in the below issue.
    we have a Linux server with agent version 11.12.009 installed on it. when I try running opcragt command on it through are management server it gives the output that all agent components are running.
    but when I check the agent status or version through opcagt command on it it gives below error:
    ERROR:   (depl-86) Unable to execute command 'opcagt' on node
                       (depl-176) Message returned from host           
    (xpl-117) Timeout occurred while waiting for data.
    Below are the error lines that I got from system.txt file of the server:
    0: ERR: Fri Dec 19 09:09:38 2014: ovconfd (3708/140429034952480): (conf-180) Could not create messenger for configuration server 'ovconfd' and register its methods with the messenger object.
    1: ERR: Fri Dec 19 09:09:38 2014: ovconfd (3708/140429034952480): (xpl-89) write(11)[012C5430] failed.
    2: ERR: Fri Dec 19 09:09:38 2014: ovconfd (3708/140429034952480): (RTL-28) No space left on device
    Could anyone please let me know what can be the issue in this.
    Thanks,
    Akansha

    ORA-00600: internal error code, arguments: [kzxcInitLoadLocal-7], [942],
    [ORA-00942: table or view does not exist
    ORA-01403: no data found
    ORA-06512: at "SYS.DBMS_NETWORK_ACL_ADMIN", line 252
    ORA-06512: at line 36
    ORA-01403: no data foundWhat does this query return?
    SQL>  SELECT HOST, ACL
    FROM DBA_NETWORK_ACLS;Please see (Redefining a Network Access Control List Fails with ORA-1403 [ID 854083.1]).
    Thanks,
    Hussein

  • Why are calendar subscriptions not up to date?

    When I select Subscriptions from within iCal, the available options are dated 2010 and 2011, even in the Most recent list.
    Why are more current calendars not available?
    Also, I have downloaded the US Holiday calendar before.  It updates the holidays every year except Easter.  However, the site does not
    offer a Christian holiday calendar except a link that is way out of date.  What gives?

    Thanks for the input. I had been searching the wrong words. I never thought to search for subscriptions.
    Thanks again.

  • Date data from Web Intelligence Report not equal to Date from Source

    Hi,
    I am creating a Web intelligence report based on a BEx query. I have a field called 'Date' that I am bringing over from the BEx query. It has a format of MM/DD/YYYY. When I view the 'Date' in Web Intelligence, it is displaying as 1/1/70. For example, in the BEx Query, 'Date' = 11/01/2011. In Crystal Reports, it is showing up as 1/1/70 as the only date. The source field contains more than 1 date.  I'm not sure what's going on. I am using the 14.0.0 (2010) version of the Web Intelligence through the BusinessObject Launch Pad.
    Please help!
    -Janice

    Hi
    The patches for SAP BusinessObjects BI4.0 are accumulative.  This means you can download the latest patch (for the Support Package that you have installed) and it will have all the patch fixes
    It looks like older patches are being removed from the sites & only the most recent patch or patches are available since they are accumulative
    I believe Patch 2.15 should now be available, but anything later than Patch 2.6 should help you in this instance
    I hope this helps
    regards...ian

  • Why are my bookmarks not organised by date anymore?

    So a few days ago my bookmarks started playing up, a few appeared without logos near the top of the list, not in date order. I restarted my MacBook yesterday and now they are completed unorganised, I have ones from months ago at the bottom and they are no longer in date order like they used to be. How can I arrange them so at the bottom of the list are the most recently added ones? I can't find anything I am looking for! Thanks.

    They should be. If you have lost bookmarks try restarting Safari:
    1. Press the Home button
    2. Double click the Home button to bring up the "Recent Apps" tray.
    3. Touch and hold on the Safari icon in the "Recent Apps" tray until a "-" appears.
    4. Touch the "-" to terminate Safari.
    5. Restart Safari and see if your Bookmarks are back.

  • Why  my DropDownByKey can not display witn data???

    //@@begin wdDoInit()
        //初始化任务查询下拉列表
         String contextPathQC = "ListBox.QueryCondition";
         ISimpleTypeModifiable  queryListBoxItem = wdThis.wdGetAPI().getContext().getModifiableTypeOf(contextPathQC);
         IModifiableSimpleValueSet queryConditionVS = queryListBoxItem.getSVServices().getModifiableSimpleValueSet();
         String[] queryCondition = {"全部","等待","运行中","邮件错误","完成","已提取","终止","取消"};
         for (int i = 0; i < queryCondition.length; i++)
              queryConditionVS.put(queryCondition<i>, queryCondition<i>);
         //初始化DQ服务灾难恢复下拉列表
         List listMds = RepositoryManager.repList;     
         String contextPathDQB = "ListBox.SystemBack";
         ISimpleTypeModifiable  dqBackListBoxItem = wdThis.wdGetAPI().getContext().getModifiableTypeOf(contextPathDQB);
         IModifiableSimpleValueSet dqBackConditionVS = dqBackListBoxItem.getSVServices().getModifiableSimpleValueSet();
         for (int i = 0; i < listMds.size(); i++)
              dqBackConditionVS.put(((Repository)listMds.get(i)).mdmServer, ((Repository)listMds.get(i)).mdmServer);
    these is the init code!!!

    Are you passing String array in below line,I think you to pass just a string.
    queryConditionVS.put(queryCondition, queryCondition);
    And di u try to check if it works using the Strings in English.
    And one more thing if are you trying to fill data from a node,why don't u try using DropdownbyIndex

  • Why Java VisualVm Could not show running applications of remote server

    Hi,everyone. I run jstatd in the remote server, and run java visualVM in local ,but the applications running in remote server could not display in the visualVM panel.
    this is local viaualVm Info:
    ===============================================
    Version:
    1.7.0_02 (Build 1320-110325); platform 110131-9c8b3bfb3a1e
    System:
    Windows 7 (6.1) Service Pack 1, amd64 64bit
    Java:
    1.7.0_02; Java HotSpot(TM) 64-Bit Server VM (22.0-b10, mixed mode)
    Vendor:
    Oracle Corporation, http://java.oracle.com/
    Environment:
    GBK; zh_CN (visualvm)
    Userdir:
    C:\Users\Johnny\AppData\Roaming\.visualvm\7
    Clusters:
    C:\Java\jdk1.7.0_02\lib\visualvm\platform
    C:\Java\jdk1.7.0_02\lib\visualvm\visualvm
    C:\Java\jdk1.7.0_02\lib\visualvm\profiler
    有关详细信息,请访问 http://visualvm.java.net。在 NetBeans 平台上构建。
    ==============================================================
    the OS of remote server is CentOS 6. jvm info:
    ==============================================================
    java version "1.7.0_02"
    Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
    Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)
    ==============================================================
    start jstatd command is :
    ====================================
    ./jstatd -J-Djava.security.policy=jstatd.all.policy -p 2020
    ====================================
    the content if jstatd.all.policy which in the $JAVA_HOME\bin
    =====================================
    grant codebase "file:${java.home}/../lib/tools.jar" {
    permission java.security.AllPermission;
    =====================================
    whats wrong happened ?
    帖子经 user5950241编辑过

    are you running jstatd on the remote server as a user with permission to see the jvm processes you care about?

  • I would like to know why is my icloud not storing any data!!

    i hv enabld evrything in the setting but when i tap on manage storage, nuthing seems to be there!! whats rong!! what can i do..?

    App data is stored on the phone, unless the app is specifically developed to work with iCloud, not many are as yet. App data is mainly only stored in iCloud as part of a back up, if you use iCloud back ups.

  • Why is Total Licenses not equal to Available plus Issued?

    We have a new Windows 2012R2 server and have just installed Remote Desktop Services on it.
    We added some licenses through SPLA, Volume License And the Per User CALs show up in RD license manager.
    But even though the Total Licenses number is correct, it says 0 Available, and 0 Issued. So where did our licenses end up?
    When we connect now, it pulls a "Build-In OverUsed" License.
    How do we solve this?
    Thanks / Finn Bøgild

    Hi Finn,
    Thank you for posting in Windows Server Forum.
    Did you found any specific Event ID such as 1130 \1128 or any other related ID?
    There is one workaround for this issue, where we need to delete the all REG_Binary key except default.
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod
    After performing above steps, restart the server and check whether licensing is showing correctly.
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    TechNet Community Support

  • TimeZone.getDefault() question

    Hi All
    I have a simple program as below
    import java.util.TimeZone;
    public class TimeTest
    public static void main(String args[])
    System.out.println("Current time zone: " + TimeZone.getDefault().getID());
    I have 2 linux machines and the same jvm installations are mounted on both machines.
    Running on machine 1 gives
    Current time zone: Europe/London
    running on machine 2 gives
    Current time zone: America/New_York.
    The TZ environment varaible is unset on both machines and running 'date' from the command line on either machine returns a timestamp in GMT.
    So clearly there's something about machine 2 that effects the timezone.
    There are various versions of java mounted across both machines including flavours of 1.4, 1.5 and 1.6 but the exact version of java used makes no difference to the behaviour per machine, machine 1 always says Europe/London and machine 2 always says America/New_York.
    Can anyone suggest any reasons for this behaviour?
    Appreciate any feedback

    As far as I recall JVM gets the system variables during its start up. That could be the couse of the problem. But I am not sure of this tho.

  • Client Version in console not up-to-date

    I have updated my SCCM 2012 SP1 clients with the SCCM 2012 SP1 CU4 msp patch.
    Now all clients do have a CcmFramework version 5.00.7804.1500 but still a lot of my clients have Client Version .1000 or .1400. Also in control panel the Configuration Manager CLient displayes .1500.
    How is the Client Version calculated and why is my console not up-to-date ?
    Is this a matter of time ?

    Client version is updated through the Heartbeat.
    Try to run Discovery Data Collection Cycle from the Control panel of a client to see if he sends the correct version.

  • Bex report does not show loaded data at once

    Hi experts,
    Why Bex report does not show loaded data at once after loading is finished but after some time?
    Could be the reason of it:
    a) huge amount of data in infocube.
    b) there are no deleting/creating indexes before/after loading, because it takes too much time
    c) anothe reason?
    Thank you,
    Tigr_Z

    Hi Tigr,
    A and B both can be the reasons behind, but normally in case of B option the results on report output can be wrong like duplicates sort of showing you double figures.
    C - it can be resource issue, so please look into all and double check with basis if thats the case.
    Regards
    Sunny

  • Error when running netca command

    Hi guru's,
    My database version ;11.1.0.7
    i am running netca command in linux
    in /u01/oracle/TEST/db/tech_st/11.1.0/network/admin
    i am going to TCPs litener with port 2484.
    following error is appeared
    so please Guide me to solve this problem.
    Oracle Net Services Configuration:
    Xlib: connection to ":0.0" refused by server
    Xlib: No protocol specified
    java.lang.NullPointerException
    at oracle.ewt.lwAWT.BufferedApplet.<init>(Unknown Source)
    at oracle.net.ca.NetCA.<init>(Unknown Source)
    at oracle.net.ca.NetCA.main(Unknown Source)
    Oracle Net Services configuration failed. The exit code is -1
    Regards,
    ***SBJ***

    user8909477 wrote:
    i am running netca command in linuxGreat. But WHICH Linux???? Surprisingly it makes a difference. Just like asking to talk to a person, and specifying by family name, you might get the mother, the father, the son - and each might give a different response.
    >
    in /u01/oracle/TEST/db/tech_st/11.1.0/network/admin
    i am going to TCPs litener with port 2484.
    following error is appeared
    so please Guide me to solve this problem.
    Oracle Net Services Configuration:
    Xlib: connection to ":0.0" refused by server
    Xlib: No protocol specified
    Are you logging on as root? Are you SU'ing to Oracle or trying to run as riit?
    Try logging out - all the way out. Don't stop there, you need to log ALL the way out.
    And then log in as user Oracle.
    Logging in as root causes all sorts of headaches. Only SU to root, and then only when you absolutely need it.
    Now that you have logged out of root, and logged in (not just su'd) to oracle, what happens??

Maybe you are looking for