When using android, you are always helpless when you modify the default time format. This article will provide a solution to this problem. For more information, see
When the language is English, the default time format is mm/DD/yyyy. How can I change the default time format to DD/mm/yyyy, I don't know whether the initial value is given at the framework layer initialization or during compilation. Which of the following heroes knows how to do this?
1. Modify the file
Alps \ frameworks \ base \ packages \ SettingsProvider \ res \ values \ defaults. xml
Add code <string name = "time_12_24" translatable = "false"> 24 </string>
The red flag indicates the 24-hour format. It can also be changed to 12 (12-hour format)
2. Modify the file alps \ frameworks \ base \ packages \ SettingsProvider \ src \ com \ android \ providers \ settings \ DatabaseHelper. java
Find the loadSystemSettings () function and add the following statement to the function:
LoadStringSetting (stmt, Settings. System. TIME_12_24, R. string. time_12_24 );