-1

Assume the date is April 26, 2013. I need to create a date with time as zero with specific timezone.

Basically need to do a conversion of default time of one timezone to another

Ex: April 26,2013 need to be set with 00:00 with EDT or EST timezone then i need to find the equivalent time value for IST or any timezone.

Could you please help me on this?

Thanks.

user2323036
  • 1,515
  • 5
  • 19
  • 27

2 Answers2

4

I would do it this way

Calendar c = new GregorianCalendar(2013, Calendar.APRIL, 26);
c.setTimeZone(TimeZone.getTimeZone("GMT"));
Date date = c.getTime();
Evgeniy Dorofeev
  • 133,369
  • 30
  • 199
  • 275
0

If I understand correctly you want to convert a DateTime from one timezone to another ?

If so you are going to want to use a DateFormat. More info about this here

Community
  • 1
  • 1
Jim
  • 469
  • 1
  • 3
  • 13