java YST9YDT time zone problem


#1

members,
The timezone i get from Anchorage AK (PANC) is YST9YDT.
When i set this time zone to a calendar object in java and print it out,
the zone info shows GMT instead of the set time zone.

Later when i try to print all the available time zones using java,
i can find only SystemV/YST9YDT and no “YST9YDT” i think this is creating the problem.
Java expects “SystemV/YST9YDT” while flightXML give just “YST9YDT” and all my flight time info is all messed up.
when i set “SystemV/YST9YDT” as the time zone, it prints out correct.
is this a java only problem. Anyone else faced this.

Regards
krishna.

The code snippet ---------------

Calendar cal = Calendar.getInstance();
// prints the calendar obj with the local time zone as default
System.out.println(cal);

// calendar obj with the new time zone
TimeZone tz = TimeZone.getTimeZone(“YST9YDT”);
cal.setTimeZone(tz);
System.out.println(cal);

// calendar obj with the new time zone systemv prefix
tz = TimeZone.getTimeZone(“SystemV/YST9YDT”);
cal.setTimeZone(tz);
System.out.println(cal);

The result ----------------------

java.util.GregorianCalendar[time=1214914093051,areFieldsSet=true,areAllFieldsSet
=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=“Asia/Calcutta”,offset=198
00000,dstSavings=0,useDaylight=false, – blah blah –

java.util.GregorianCalendar[time=1214914093051,areFieldsSet=false,areAllFieldsSe
t=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=“GMT”,offset=0,dstSaving
s=0,useDaylight=false,-- blah blah –

java.util.GregorianCalendartime=1214914714926,areFieldsSet=false,areAllFieldsSe
t=false,lenient=true,zone=sun.util.calendar.ZoneInfoid=“SystemV/YST9YDT”,offset
=-32400000,dstSavings=3600000,useDaylight=true,transitions=276,lastRule=java.uti