TimeZone problem
I want to have the time (ExactTime). Like GMT+08:00(Singapore).
Is that possible to get the time Exactly same as our TimeZone.
I tried with the help of the TimeZone class to change the TimeZone,Even then the Default value was displaying
Can you please give me some suggestion that i will get the Exact time
Thanks in advance
kelvin
[368 byte] By [
emerge87a] at [2007-11-27 7:46:11]

# 3
you have to use a Calendar, a Date and a TimeZone..
...
Calendar calendar=Calendar.getInstance();
calendar.setTimeZone(new TimeZone(<singapore_TimeZone>));
calendar.setTime(new Date()); // it would work with out this, you have to test
Date mySingaporeDate=calendar.getTime();
...
see corresponding javadoc for more infos
# 4
hi thx for the info but the time still remain as UTC. For ur info i am using WTK2.5, here is the codes tt i have tried:Calendar calendar=Calendar.getInstance();TimeZone tz = TimeZone.getTimeZone("CST");calendar.setTimeZone(tz);Date sgdt