package my.pack; import android.text.format.Time; public class MyTime { public static String now() { Time localTime = new Time("Asia/Hong_Kong"); localTime.setToNow(); return localTime.format("%Y-%m-%d %H:%M:%S"); } }
package my.pack; import android.text.format.Time; public class MyTime { public static String now() { Time localTime = new Time("Asia/Hong_Kong"); localTime.setToNow(); return localTime.format("%Y-%m-%d %H:%M:%S"); } }