Hello
I've got Fedora Core 2 kernel 2.6.8
if I run a command date it gives me the output Fri Oct 29 22:03:50 GEST 2004
but If I compile and run a simple java program (with jdk1.4.2 or jdk1.5)
public class A { public static void main(String[] args) { System.out.println(new java.util.Date()); } }
it gives me the output Fri Oct 29 23:03:50 GEST 2004
I'm sure it's a fedora problem, because I did not have that problems on Core 1 or previous releases.
What should I do?
Thank you
On Fri, Oct 29, 2004 at 10:06:48PM +0400, Vano Beridze wrote:
if I run a command date it gives me the output Fri Oct 29 22:03:50 GEST 2004
but If I compile and run a simple java program (with jdk1.4.2 or jdk1.5)
it gives me the output Fri Oct 29 23:03:50 GEST 2004
Is it just me, or are the output of both the "date" command and the java program exactly the same? :-)
Ernie McCracken wrote:
On Fri, Oct 29, 2004 at 10:06:48PM +0400, Vano Beridze wrote:
if I run a command date it gives me the output Fri Oct 29 22:03:50 GEST 2004
but If I compile and run a simple java program (with jdk1.4.2 or jdk1.5)
it gives me the output Fri Oct 29 23:03:50 GEST 2004
Is it just me, or are the output of both the "date" command and the java program exactly the same? :-)
Its just you, they were run exactly 1 hour apart. B^)
Ernie McCracken wrote:
On Fri, Oct 29, 2004 at 10:06:48PM +0400, Vano Beridze wrote:
if I run a command date it gives me the output Fri Oct 29 22:03:50 GEST 2004
but If I compile and run a simple java program (with jdk1.4.2 or jdk1.5)
it gives me the output Fri Oct 29 23:03:50 GEST 2004
Is it just me, or are the output of both the "date" command and the java program exactly the same? :-)
They differ by an hour. What does the java program source look like?
Vano Beridze wrote:
Hello
I've got Fedora Core 2 kernel 2.6.8
if I run a command date it gives me the output Fri Oct 29 22:03:50 GEST 2004
but If I compile and run a simple java program (with jdk1.4.2 or jdk1.5)
public class A { public static void main(String[] args) { System.out.println(new java.util.Date()); } }
it gives me the output Fri Oct 29 23:03:50 GEST 2004
I'm sure it's a fedora problem, because I did not have that problems on Core 1 or previous releases.
What should I do?
How about using java.util.Calendar? java.util.Date is somewhat old, and lots of functionality has been implemented in java.util.Calendar that was not backported to java.util.Date (localization issues were quoted as the reason for "dumping" java.util.Date)
//Andro