Default Android Time zone List -
I was thinking that I could get the default code anywhere for the time zone selection list for Android version 2.3.3 Am I
string [] id = timezone.getAvfid (); For (int i = 0; i = 0? "+": "-"; Waiting time zone return = string format ("(UTC% s% 02d:% 02d)% s", sign, hour, minute, field); println (timeZonePretty); ///////////// //////////////////////////////////////////////// /// ListView listitems = (ListView) findViewById (R.id.list); ArrayAdapter & lt; string & gt; adapter = new ArrayEptter & lt; string & gt; (this, Android. R. Late Simple_L_Listime, ID); Listitems.setAdapter (adapter); } Document for the time zone.
To set the time zone
The sample code for the settings is US Time Zone
// Calendar Category Calendar = Calendar. Create an Object Object First; // Now set the date using the dateformat class SimpleDateFormat sdf = new SimpleDateFormat ("dd-MMM-yyyy hh: mm: ss z");); // Set periodically at the end. SimpleDateFormat class settimeJohn () method sdf.setTimeZone (Timezone. Get Time Zone ("America / Los_Ageelas"));
Comments
Post a Comment