PDA

View Full Version : 12hr or 24hr Time & Clock Settings & Override...


GSLEON3
7th March 2008, 08:33 PM
Okay, recently I've seen & answered several people trying to change their time settings on ROM that either are defaulted with 24hr clock or ROM's that do not allow for Time/Clock configurations in the Regional Settings of the Kaiser.

Just like your PC or UMPC the Kaiser has an override for NLS (National Language support) settings. Throught the registry you can overide the default format of how times & dates are displayerd on your device.

It's simple. Navigate with your favorite registry editor to HKLM\nls\overrides.
Once inside the "overrides" key you can add several Registry "String" Values that will override & dictate the time & date format of your device.

As you can see from this code excerpt, there are many possible override date & time variabls that can be added into the registry:
SetKeyValue HKEY_LOCAL_MACHINE, " nls" , " DefaultOCP" , " 437" , REG_DWORD
SetKeyValue HKEY_LOCAL_MACHINE, " nls" , " DefaultACP" , " 1252" , REG_DWORD
SetKeyValue HKEY_LOCAL_MACHINE, " nls" , " DefaultLCID" , " 1033" , REG_DWORD
SetKeyValue HKEY_LOCAL_MACHINE, " nls\overrides" , " S2359" , " PM" , REG_SZ
SetKeyValue HKEY_LOCAL_MACHINE, " nls\overrides" , " S1159" , " AM" , REG_SZ
SetKeyValue HKEY_LOCAL_MACHINE, " nls\overrides" , " STime" , " :" , REG_SZ
SetKeyValue HKEY_LOCAL_MACHINE, " nls\overrides" , " ITLZr" , " 0" , REG_DWORD
SetKeyValue HKEY_LOCAL_MACHINE, " nls\overrides" , " ITime" , " 0" , REG_DWORD
SetKeyValue HKEY_LOCAL_MACHINE, " nls\overrides" , " STFmt" , " h:mm:ss tt" , REG_SZ
SetKeyValue HKEY_LOCAL_MACHINE, " nls\overrides" , " SLDte" , " dddd, MMMM dd, yyyy" , REG_SZ
SetKeyValue HKEY_LOCAL_MACHINE, " nls\overrides" , " SDate" , " /" , REG_SZ
SetKeyValue HKEY_LOCAL_MACHINE, " nls\overrides" , " IDate" , " 0" , REG_DWORD
SetKeyValue HKEY_LOCAL_MACHINE, " nls\overrides" , " SSDte" , " M/d/yy" , REG_SZ
End Sub

Private Sub loadcurrent_click()
Dim DefaultOCP As Long
Dim DefaultACP As Long
Dim DefaultLCID As Long
Dim S2359 As Long
Dim S1159 As Long
Dim STime As Long
Dim ITLZr As Long
Dim ITime As Long
Dim STFmt As Long
Dim SLDte As Long
Dim cSDate As Long
Dim IDate As Long
Dim SSDte As Long
' region values
DefaultOCP = QueryValue(HKEY_LOCAL_MACHINE, " nls" , " DefaultOCP" ) ' 437 ' Decimal ' REG_DWORD
DefaultACP = QueryValue(HKEY_LOCAL_MACHINE, " nls" , " DefaultACP" ) ' 1252 ' Decimal ' REG_DWORD
DefaultLCID = QueryValue(HKEY_LOCAL_MACHINE, " nls" , " DefaultLCID" ) ' 1033 ' Decimal ' REG_DWORD

' Number values
' currency Value

' Time Values
S2359 = QueryValue(HKEY_LOCAL_MACHINE, " nls\overrides" , " S2359" ) ' PM ' REG_SZ
S1159 = QueryValue(HKEY_LOCAL_MACHINE, " nls\overrides" , " S1159" ) ' AM ' REG_SZ
STime = QueryValue(HKEY_LOCAL_MACHINE, " nls\overrides" , " STime" ) ' : ' REG_SZ
ITLZr = QueryValue(HKEY_LOCAL_MACHINE, " nls\overrides" , " ITLZr" ) ' 0 ' Decimal ' REG_DWORD
ITime = QueryValue(HKEY_LOCAL_MACHINE, " nls\overrides" , " ITime" ) ' 0 ' Decimal ' REG_DWORD
STFmt = QueryValue(HKEY_LOCAL_MACHINE, " nls\overrides" , " STFmt" ) ' h:mm:ss tt ' REG_SZ

' Date values
SLDte = QueryValue(HKEY_LOCAL_MACHINE, " nls\overrides" , " SLDte" ) ' dddd, MMMM dd, yyyy ' REG_SZ
cSDate = QueryValue(HKEY_LOCAL_MACHINE, " nls\overrides" , " SDate" ) ' / ' REG_SZ
IDate = QueryValue(HKEY_LOCAL_MACHINE, " nls\overrides" , " IDate" ) ' 0 ' Decimal ' REG_DWORD
SSDte = QueryValue(HKEY_LOCAL_MACHINE, " nls\overrides" , " SSDte" ) ' M/d/yy ' REG_SZ

List1.AddItem " DefaultOCP " & DefaultOCP & " ***"
List1.AddItem " DefaultACP " & DefaultACP & " ***"
List1.AddItem " DefaultLCID " & DefaultLCID & " ***"
List1.AddItem " S2359 " & S2359 & " ***"
List1.AddItem " S1159 " & S1159 & " ***"
List1.AddItem " STime " & STime & " ***"
List1.AddItem " ITLZr " & ITLZr & " ***"
List1.AddItem " ITime " & ITime & " ***"
List1.AddItem " STFmt " & STFmt & " ***"
List1.AddItem " SLDte " & SLDte & " ***"
List1.AddItem " SDate " & cSDate & " ***"
List1.AddItem " IDate " & IDate & " ***"
List1.AddItem " SSDte " & SSDte & " ***"
End Sub


So to change your default clock behavior when alternate regional settings are not available you can use any of the above strings For example:
If you add the following Values yu can theen modify the way the time is interpeted on you device.

STime STRING ":" - This setting allows you to modify the separator between hours and minutes, minutes and seconds
STFmt STRING "h:mm:ss tt" - Changes the time layout or format (see below list)
S1159 STRING "am" - Allows you to modify the AM suffix
S2359 STRING "pm" - Allows you to modify the PM suffix
Time Format String
h - Hours 12 Hour Clock with No Leading Zero
hh - Hours 12 Hour Clock with Leading Zero
H - Hours 24 Hour Clock with No Leading Zero
HH - Hours 24 Hour Clock with Leading Zero
m - Minutes with No Leading Zero
mm - Minutes with Leading Zero
s - Seconds with No Leading Zero
Ss - Seconds with Leading Zero
t - am/PM indicator - First Letter Only
tt - am/PM indicator - First Two Letters
ttt - am/PM indicator - First Three Letters

Frank C
28th February 2009, 05:23 PM
Have tried to change the time format in HTC home following the steps as you described:
- Create a STFmt string in NLS "overrides" with the values HH:mm:ss; especially want the seconds to be displayed on my today screen.
- In regional settings have selected HH:mm:ss aswell.
- Have tried several combinations including adding ttttt and tttttt (microsoft website)

Seems that the string does not override....and HH:mm value is cooked in rom.

Any advice what I could try?


My device is a touch cruise with stock rom WM 6.1 (313.405)

Yami
11th April 2010, 10:16 PM
How can I change the week start day and weekend, for example I want to change start day from Sunday to Saturday and the weekend to Tuesday & Friday.

mieshco
28th April 2010, 07:33 PM
How can I change the week start day and weekend, for example I want to change start day from Sunday to Saturday and the weekend to Tuesday & Friday.

If you're using Manila (or something similar) just go to the calendar tab>Menu>Settings>Week starts at: and select Saturday from the dropdown list.

If you're not using Manila just open your calendar or select calendar.exe from windows folder then select Menu>tools>options>general tab> and there is a textfield saying first day of the week (text can vary in different language versions) > select any day you want from dropdown list.

PM me if this doesn't help...

daveb673
7th February 2011, 03:34 AM
This worked, but only in the clock screen, and if you have the clock displayed for other screens than home and only after I did a soft reset. I had hoped it would also change the time on the HTC home plug, but that only seemed to respond to the single or double digit change (ie to show a zero or not).
[edit] I did some more fiddling around, and went to the regional settings inside Settings/System. There click the time tab, and cycle the Time style. Don't ask me why it worked, but it did. I now see 24hr time in the HTC home plug.