[Tilt, TyTN II, MDA Vario III Windows Mobile ROM De] bdubbrocks:
THANK YOU!!!

GSLEON3

Senior Member Join Date: Dec 2006

Location: La La Land

Posts: 993

12hr or 24hr Time & Clock Settings & Override...

--------------------------------------------------------------------------------

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:

Code:

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 SubSo 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