Somnath Mallick wrote:^^Well at least, Well do you mean to say that i should change it like this?
Yes, but note that hh (lower-case) for the hours means the hour in AM/PM (1-12) - this will fail if hours is 17. Try this:
Somnath Mallick wrote:But still all the dates are printing in IST!
Yes, because Date.toString() uses the local timezone setting of your system - it displays the Date object in your local timezone. Instead of using Date.toString(), format the date object using a DateFormat object; set the timezone that you want your date displayed in on the DateFormat object. As Ulf said, class Date itself doesn't know about timezones.