| Author |
Calendar Class
|
Nischal Tanna
Ranch Hand
Joined: Aug 19, 2003
Posts: 182
|
|
Hi Guys.. I m having a small probs here.. I require my sysdate to be shown as per s specific timezone and Locale..for eg.. If i require to show the United States time..and also the date.. for eg..i have some code written ..but i m not getting the required answer.. //For indian standard time.. Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT+05:30")); int hour12 = cal.get(Calendar.HOUR_OF_DAY); System.out.println(hour12); The same i want for United States..also guys check out the output of the abve code..i guess not a perfect answer ... neways hoping lot of replies..
|
Thnx
|
 |
Amit KumarS
Ranch Hand
Joined: Oct 10, 2003
Posts: 100
|
|
Hi... i think ur code is alright.. i can't figure our any probs with that... only thing is that it is returning hours in 24 hrs format.. if u want it in 12 hr format then istaed of you should write and for american time you can write.. i hope i am clear.. for any quesries please revert back.. Thanks Amit
|
****************************<br />In 24 hrs Earth rotates once on its Axis.
|
 |
 |
|
|
subject: Calendar Class
|
|
|