Hi everybody!
I am getting a big problem in java. I have a client computer in windows and a linux server. No my problem is that when i run the same application in linux and in linux there seem to be a problem with the time. In windows the time is 1 hour backwards. E.g.
if the my windows sytem time is 13:15:20
the java app returns 12:15:20
but i don't get this problem when running in linux, the time is displayed correctly.
Here is my code:
Code:
//TimeTest.java
import java.awt.*;
import java.sql.*;
public class TimeTest
{
public static void main(String[] args)
{
Time t = new Time(System.currentTimeMillis());
System.out.println("Current Time is "+t.toString());
}
}
As you can see I am using java.sql.Time which is convinient for portability to MySQL.
Does someone knows how to correct this problem?