M
Megha Vishwanath
Hi,
A jdk installation on my machine has picked up the time zone
Asia/Rangoon
My time zone is actually Asia/ Calcutta
Apparently, j2sdk1.4.2_05 does not even support Asia/Rangoon- MMT that
gets set by default to GMT.
ie., TimeZone tz=TimeZone.getTimeZone(MMT); tz.getDisplayName() is GMT
I have been trying to manipulate the timezone by setting the
user.timezone system property through this piece of code-
--------------------------------------------------------------------------------
Calendar cal = Calendar.getInstance();
System.out.println("\n TIME ZONE :"+
cal.getTimeZone().getDisplayName());
System.out.println("\n TIME :"+ cal.getTime().toGMTString());
System.out.println("\n user.timezone:
"+System.getProperty("user.timezone"));
System.out.println("\n user.country:
"+System.getProperty("user.country"));
System.out.println("\njava.home: "+System.getProperty("java.home"));
System.setProperty("user.timezone","Asia/Calcutta");
System.out.println("\nuser.timezone:
"+System.getProperty("user.timezone"));
System.out.println("\n New Time Zone:
"+TimeZone.getDefault().getDisplayName());
--------------------------------------------------------------------------------
The user.timezone only temporarily gets set only for the lifetime of
the program.
How can I permanantly change this value on my Linux Installation of
J2SDK1.4.2_05? Please help.
-Thanks
Megha.
A jdk installation on my machine has picked up the time zone
Asia/Rangoon
My time zone is actually Asia/ Calcutta
Apparently, j2sdk1.4.2_05 does not even support Asia/Rangoon- MMT that
gets set by default to GMT.
ie., TimeZone tz=TimeZone.getTimeZone(MMT); tz.getDisplayName() is GMT
I have been trying to manipulate the timezone by setting the
user.timezone system property through this piece of code-
--------------------------------------------------------------------------------
Calendar cal = Calendar.getInstance();
System.out.println("\n TIME ZONE :"+
cal.getTimeZone().getDisplayName());
System.out.println("\n TIME :"+ cal.getTime().toGMTString());
System.out.println("\n user.timezone:
"+System.getProperty("user.timezone"));
System.out.println("\n user.country:
"+System.getProperty("user.country"));
System.out.println("\njava.home: "+System.getProperty("java.home"));
System.setProperty("user.timezone","Asia/Calcutta");
System.out.println("\nuser.timezone:
"+System.getProperty("user.timezone"));
System.out.println("\n New Time Zone:
"+TimeZone.getDefault().getDisplayName());
--------------------------------------------------------------------------------
The user.timezone only temporarily gets set only for the lifetime of
the program.
How can I permanantly change this value on my Linux Installation of
J2SDK1.4.2_05? Please help.
-Thanks
Megha.