Incorrect Timezone in Java

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Incorrect Timezone in Java
# 1  
Old 04-08-2014
Incorrect Timezone in Java

Dear All,

I have two Red hat Linux servers where the DST has picked the right time.
unfortunately the Java Time in one Server is coming incorrect

Correct info
[root@hq]# java GetCurrentTimeZoneUsingCalendar
Current TimeZone is : Eastern European Time

Incorrect Info
[root@hq]# java GetCurrentTimeZoneUsingCalendar
Current TimeZone is : GMT+02:00

With a little bit of googling i could find below information for windiows :-

If you have disabled the DynamicDaylightTimeDisabled option, then Java always returns a GMT (Greenwich mean time) offset and not a time zone ID that is compatible with the uniform naming convention (such as Europe/Berlin). For example, the offset will be expressed as GMT+01 and not Europe/Berlin.

I have already verified the ZoneInfoMappings,/etc/localtime and system-config-date to show the right time and timezone.

Unfortunately i dont see a procedure to correct the timezone/time in Java.


Best Regards
Pistachio
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Changing java timezone on RHEL 5

Hi all, I faced with some problem when I changing java timezone on RHEL 5. I used tzupdater.jar tool from oracle to update java timezone. But I missed stopping applications before I run tzupdater tool. So some applications working with wrong timezone. I think there's some cached instance of... (0 Replies)
Discussion started by: sembii
0 Replies

2. Solaris

TIMEZONE problem..

hii there... can you guys help me with TIMEZONE setting on my solaris box i tried to edit cat /etc/TIMEZONE..but i think it will work after rebooting, but something i did which took me to GMT my problem is i have this issue on a server, and i have to fix this without rebooting. thanks for... (1 Reply)
Discussion started by: 6pound
1 Replies

3. Programming

How to prevent incorrect string using reg expr in Java?

Hi All, I need your input on how to mask out / ignore a string that does not match a working regular expression (continually refining) pattern in Java. Below is the code snippet which is picking up all the lines with the correct regular expression string except one known so far: public... (0 Replies)
Discussion started by: gjackson123
0 Replies

4. Solaris

timezone issue

Hi, On my server timezone is IST, so I have configured the sudo for user to change the date, but when he is changing the date time zone is also getting changed from ist to gmt. using solaris 10. I have checked in /etc/TIMEZONE file in that it is showing TZ=Asia/Calcutta, wheather any other file... (1 Reply)
Discussion started by: manoj.solaris
1 Replies

5. UNIX for Advanced & Expert Users

Timezone

HI ; I got Solaris8 installed oon Sunfire V440 .I have TZ=GMT in /etc/TIMEZONE , but when i log in as root i see the date in GMT+1. So i have every time to "set TZ=GMT ; export $TZ" . How can i set the TZ=GMT at the startup defenitely. Thanks :) (7 Replies)
Discussion started by: oss
7 Replies

6. UNIX for Dummies Questions & Answers

Timezone Problems

Hi all, i have running an hp-ux a-class server with hp-ux 11.00. All users without root are using the wrong timezone. root is using METDST, all others are using EDT. I have checked /etc/profile /etc/TIMEZONE /etc/ntp.conf and the .profiles from the users. But there is no failure... Is... (4 Replies)
Discussion started by: ortsvorsteher
4 Replies

7. UNIX for Dummies Questions & Answers

timezone

Hi, i am searching to change the timezone on a HP-UX11 system. Since last weekend the summertime started i am not able to change the time to the new time, every day the time changes back to wintertime. I think the problem is that the server is on the wrong timezone. Can someone help me please?... (1 Reply)
Discussion started by: eddyvdv
1 Replies

8. UNIX for Dummies Questions & Answers

Timezone

Hi, I got an question about changing timezone thrue command line on a SunOS Release 4.1.2 without restarting the computer. Now it's set on WET and I want to set the timezone to CET (GMT +1) Plz somebody help me. Regards Novisern:confused: (5 Replies)
Discussion started by: Novisern
5 Replies

9. UNIX for Dummies Questions & Answers

Timezone

Hello again, under hp-ux i have a file /etc/TIMEZONE. here is definied which timezone i am. i dont know who reads this file to set after reading the timezone under /usr/lib/tztab. my 2 questions, who reads the file /etc/TIMEZONE ( which service ) and do i need in the first line to set my... (6 Replies)
Discussion started by: ortsvorsteher
6 Replies

10. UNIX for Advanced & Expert Users

Impacts on Timezone changes

I'm running on UNIX with Solaris. I need to change the Timezone on the box and was going to make the changes to the files and then reboot the box. Someone warned me that this method should not be used and that a util (unconfig.sys I think it was) should be used to make the changes. Any ideas... (2 Replies)
Discussion started by: Lextar
2 Replies
Login or Register to Ask a Question
javaws(1)						      General Commands Manual							 javaws(1)

NAME
javaws - Java Web Start launcher command SYNOPSIS
javaws [ options ] [ URL ] PARAMETERS
options Command-line options. Options many be in any order. For a discussion of the various options, see OPTIONS below. URL Uniform Resource Locator (URL) of the JNLP (Java Network Launching Protocol) file. DESCRIPTION
The javaws command launches Java Web Start, which is the reference implementation of the Java Network Launching Protocol (JNLP). Java Web Start launches java application/applets hosted on a network. Without any options javaws will launch the Java JNLP Application Manager, from which users can launch applications/applet or configure Java Web Start. If a URL for a JNLP file is specified, javaws will launch the Java application/applet specified in the JNLP file. OPTIONS
The javaws launcher has a set of options that are supported in the current release. However, the options may be removed in a future release. All -X options are non-standard and subject to change. -offline Runs Java Web Start in offline mode. -uninstall URL Removes a specific application/applet from the user's cache, as indicated by the URL for the JNLP file. Java Web Start will exit after the command has completed. -updateVersions Updates the Java Web Start configuration file based on the current machine's settings. Java Web Start will exit when the command is completed. -Xclearcache Clears the user's cache. Java Web Start will exit after the command has completed. -Xnosplash Disables the display of the initial splash screen. -import Imports the application specified by the URL into the user's cache but does not run it.. -silent When used with the -import option, imports in silent mode; i.e., there will be no UI pop up. The process exit code will be either 0 if successful or 1 if not. -codebase URL Replaces the codebase with URL in the jnlp file specified when importing the resources. URL must be a valid URL. -system Uses the system cache instead of the user cache. -shortcut Allows the creation of shortcuts during silent import. -association Allows the creation of associations during silent import. -open arguments If specified, replaces the arguments in the jnlp file with -open arguments. -print arguments If specified, replaces the arguments in the jnlp file with -print arguments. -online Runs in online mode (default behavior). -viewer Runs the Java Application Cache Viewer (default if no URL is specified). -userConfig property-name Clears the specified deployment property. -userConfig property-name property-value Sets the specified deployment property to the specified value. -wait If specified, the javaws process will not exit until the application exits. FILES
For more information about the user and system cache and deployment.properties files, see http://java.sun.com/j2se/1.5.0/docs/guide/deploy- ment/deployment-guide/properties.html MORE INFORMATION
For more information about Java Web Start, see http://java.sun.com/j2se/1.5.0/docs/guide/javaws/index.html. 09 April 2004 javaws(1)