1

I have a time in PST TimeZone (06:00 PM PST). How can I convert this time to my TimeZone?

I tried with some code, but i can not find a method to convert the time zone.

import java.util.TimeZone;


  public void onCreate(Bundle savedInstanceState)
  {
         super.onCreate(savedInstanceState);

               // my local time zone
              TimeZone mytimezone= TimeZone.getDefault();
              String timezonename=mytimezone.getID();
              String myname=mytimezone.getDisplayName();                         

             //this is for PST
             TimeZone timezone=TimeZone.getTimeZone("PST"); 
             String timezonename= timezone.getDisplayName();   //GMT+00:00
}

Please help me...

Thank you...

Mark Mooibroek
  • 7,636
  • 3
  • 32
  • 53
Jomia
  • 3,414
  • 10
  • 46
  • 63

1 Answers1

0

Check the 1st answer here:

How to handle calendar TimeZones using Java?

Community
  • 1
  • 1
Mark Mooibroek
  • 7,636
  • 3
  • 32
  • 53