java time

Andrey Andreev andreev at cs.helsinki.fi
Mon Nov 1 11:42:39 UTC 2004


Vano Beridze wrote:
> I don't know how things work but today my time was set back to one hour 
> automatically.
> but java still reports time that is one hour ahead.
> As I said before it might not be a jdk bug because It works ok on fedora 
> core 1.
> Maybe a combination of 2.6 kernel and jdk. Just thoughts.

Works for me:

[andrei at brie andrei]$ cat A.java
public class A
{
    public static void main(String[] args)
    {
       System.out.println(new java.util.Date());
    }
}
[andrei at brie andrei]$ javac A.java
[andrei at brie andrei]$ java A
Mon Nov 01 13:43:20 EET 2004
[andrei at brie andrei]$ date
Mon Nov  1 13:43:23 EET 2004
[andrei at brie andrei]$ which javac
/usr/java/j2sdk1.4.2_04/bin/javac
[andrei at brie andrei]$ which java
/usr/java/j2sdk1.4.2_04/bin/java
[andrei at brie andrei]$ java -version
java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)
[andrei at brie andrei]$ uname -a
Linux brie.mine.nu 2.6.8-1.521 #1 Mon Aug 16 09:01:18 EDT 2004 i686 
athlon i386 GNU/Linux
[andrei at brie andrei]$ cat /etc/redhat-release
Fedora Core release 2 (Tettnang)
[andrei at brie andrei]$

j2sdk1.4.2 works fine on kernel 2.6.8 (which was the combination you 
reported). Maybe one of the systems is wrong about the GEST offset.

//Andro

-- 
Andrey Andreev
University of Helsinki
Dept. of Computer Science




More information about the fedora-list mailing list