there are two string
String date = "9/13/2012";
String time = "5:48pm";
the time is GMT+0, I wanna change it to GMT+8,what is the simplest way to change a time to particular timezone
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
SimpleDateFormatset to the UTC time zoneDatevalue using aSimpleDateFormatset to the time zone you’re interested in. (It’s likely to be something other than just “UTC+8” – you should find out which TZDB time zone ID you really want.For example:
(If you can use Joda Time instead, that’d be great – but I understand that it’s pretty big for an Android app.)