sumitha sudhakar wrote:hi,
I am using windows 7. my system time is 11:44 AM, but if i try to dispaly the time using normal java code;
Date dt = new Date();
System.out.println("date is"+dt);
i am getting different time date isTue Nov 16 06:14:38 GMT 2010
You can use the SimpleDateFormat to specify the Locale and the format you want the date in.
Update: You can even try Calendar class.