Time Zone Problem on Windows
I created a simple java test application that echo the time zone and the current date/time (to test Cruise controll problem).
and it prints out the wrong time zone GMT-05:00 instead of GMT+02:00
needless to say the Server I'm running has the right time and Time Zone set.
Running with Java jdk1.6.0_03
On Windows server 2003
output:
Acre Time:
Thu Dec 24 06:24:41 ACT 2009:
where DOS shell prints
>time
The current time is: 13:24:47.33
My script is as follows:
import java.util.Date;
import java.util.TimeZone;
public class TestDate{
public static void main(String[] args){
Date date = new Date();
TimeZone tz = TimeZone.getDefault();
String tzName = tz.getDisplayName(tz.inDaylightTime(date), TimeZone.LONG);
System.out.println(tzName + ": ");
String bla = date.toString();
System.out.println(" " + bla + ":");
}
}
Please advice