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
jinfo(1)						      General Commands Manual							  jinfo(1)

NAME
jinfo - configuration info SYNOPSIS
jinfo [ option ] pid jinfo [ option ] executable core jinfo [ option ] [ server-id@ ] remote-hostname-or-IP PARAMETERS
Options are mutually exclusive. Option, if used, should follow immediately after the command name. See OPTIONS below. pid process id for which the configuration info is to be printed. The process must be a Java process. To get a list of Java pro- cesses running on a machine, jps many be used. executable Java executable from which the core dump was produced. core core file for which the configuration info is to be printed. remote-hostname-or-IP remote debug server's (see jsadebugd) hostname or IP address. server-id optional unique id, if multiple debug servers are running on the same remote host. DESCRIPTION
jinfo prints Java configuration information for a given Java process or core file or a remote debug server. Configuration information includes Java System properties and Java virtual machine command line flags. NOTE - This utility is unsupported and may or may not be available in future versions of the J2SE SDK. jinfo is not currently available on Windows platforms or on the Linux Itanium platform. OPTIONS
<no option> prints both command line flags as well as System properties name, value pairs -flags prints command line flags as name, value pairs -sysprops prints JavaSystem properties as name, value pairs -h prints a help message -help prints a help message SEE ALSO
jps(1) jsadebugd(1) 13 June 2004 jinfo(1)