W
work
Hi,
When I execute this following program in a windows PC with timezone is set
to GMT + 0 ( London) with automatic adjust for daylight saving enabled, I
get different results for java version 1.1.8 and 1.4.3.
In version 1.1.8 , the useDaylightTime() returns false which is wrong. In
version 1.4.3 , it returns true which is correct.
Similarly the getDisplayName() is not working in 1.1.8 but works in 1.4.3.
Could any body help me in how to achieve correct result for
daylightdetection for this timezone using version 1.1.8.
Here is the sample program.
import java.util.*;
public class timezone{
public static void main(String[] args) {
TimeZone tzone = TimeZone.getDefault();
//String tzn = tzone.getDisplayName(); // Not working
in 1.1.8
//System.out.println(tzn);
if (tzone.useDaylightTime())
System.out.println("Daylight time present");
else
System.out.println("Daylight time absent");
}
}
Thanks/Regards,
Work.
When I execute this following program in a windows PC with timezone is set
to GMT + 0 ( London) with automatic adjust for daylight saving enabled, I
get different results for java version 1.1.8 and 1.4.3.
In version 1.1.8 , the useDaylightTime() returns false which is wrong. In
version 1.4.3 , it returns true which is correct.
Similarly the getDisplayName() is not working in 1.1.8 but works in 1.4.3.
Could any body help me in how to achieve correct result for
daylightdetection for this timezone using version 1.1.8.
Here is the sample program.
import java.util.*;
public class timezone{
public static void main(String[] args) {
TimeZone tzone = TimeZone.getDefault();
//String tzn = tzone.getDisplayName(); // Not working
in 1.1.8
//System.out.println(tzn);
if (tzone.useDaylightTime())
System.out.println("Daylight time present");
else
System.out.println("Daylight time absent");
}
}
Thanks/Regards,
Work.