使用这个方法:通过android.text.format.DateFormat 提供的一个方法可以获取当前系统时间是否使用24小时格式:public static boolean is24HourFormat (Context context)