[XDA-University] KronicSkillz:
Hey man thanks for all your helping out the community.

Here is a little trick i learned today to remove am/pm from clock in status bar on some older roms before 4.2 and on ones that dont have the traditional smali edit because the smali is different then the one with a static const that can be changed.

it took me hours and hours to find this, i read about 20 different threads on remove am/pm but none worked for my rom.

what threw me off was that mostly everything for the statusbar is in SystemUI.apk but after i gave up with that i decided to poke around framework-res.apk for a while just because i dont like to give up on things.

Here's what i found in framework-res.apk/res/values/strings.xml

Note:this version is already edited.

<string name="am">a</string>
<string name="pm">p</string>
<string name="yesterday">Yesterday</string>
<string name="today">Today</string>
<string name="tomorrow">Tomorrow</string>
<string name="hour_minute_24" formatted="false">%H:%M</string>
<string name="hour_minute_ampm" formatted="false">%-l:%M</string>
<string name="hour_minute_cap_ampm" formatted="false">%-l:%M</string>
<string name="twelve_hour_time_format">h:mm</string>
<string name="twenty_four_hour_time_format">HH:mm</string>
<string name="numeric_date" formatted="false">%-m/%-e/%Y</string>
<string name="numeric_date_format">M/d/yyyy</string>
<string name="numeric_date_template" formatted="false">%s/%s/%s</string>
<string name="month_day_year" formatted="false">%B %-e, %Y</string>
<string name="time_of_day" formatted="false">%-l:%M:%S %p</string>
<string name="date_and_time" formatted="false">%b %-e, %Y, %-l:%M:%S %p</string>
<string name="date_time">%1$s, %2$s</string>
<string name="time_date">%1$s, %3$s</string>

this seemed to be what i was looking for so i started playing around with it; it's pretty obvious that the %p is the am/pm tag, but when i removed it from all the ones that looked relevant to the clock... nothing happened... dang.

so i gave up on that and went back to looking for smali edits, but then i thought to myself in a eureka moment... most strings are defined inside their language folder, not values/

so i navigated to /framework-res.apk/res/values-en-rUS/strings.xml

i changed the same values and bam it worked. I am pretty sure u can also customize how the dates and days of the week show up in this folder too.

for my rom i'm pretty sure it was this value that removed the am/pm from the status bar.

/values-en-rUS/strings.xml

line 86: <string name="hour_minute_cap_ampm" formatted="false">%-l:%M%^p</string>

changed to:

<string name="hour_minute_cap_ampm" formatted="false">%-l:%M</string>

but if you aren't sure you can just exhaustively find all the strings.xml in your apk, and romove the %p and %^p from them, i'm pretty sure the second one (%^p) is upper case am/pm but not positive.

that's why i assumed it was line 86 because on mine the am pm was uppercase in the statusbar and its only logical that the ^ arrow up symbol defines uppercase PM. on mine i removed them all because i didn't wanna edit the file, pack the apk, flash it etc more than once when i didn't have to.

tested on LG stock rom 4.0.4 (p930) on this rom you don't even need to touch systemUI.apk to remove am/pm =D

this link also has another way to change the date format in the status bar that works on this rom also : http://xdaforums.com/galaxy-nexus/t...-statusbar-center-t1491887/page6#post56622730 (post #26)

i removed my name from the screenshot that's why it's not centered. (at the bottom by the expanded handle) And yes that is an ICS rom even though it doesn't look like it (made alot of mods lol)