[Touch Pro2, Tilt 2 Windows Mobile General] torvin:
Hi guys.

First, some sidenotes:

1) I'm not sure where this post belongs. I hope moderator will move it accordingly

2) I'm not able to post urls, so please replace hxxp:// in those links below with http//. I will fix that as soon as the forum lets me.
​

Russia has changed its DST rules this year. All time zones are shifted +1 hour and DST is now disabled. To reflect those changes under WM we need to edit registry a little.

HKEY_LOCAL_MACHINE\Software\Microsoft\TimeZones\ is a key that allows to override timezone info. So, you need to create a subkey, which name will be the time zone index needed to change. Time zone indexes could be looked up here: hxxp://msdn.microsoft.com/en-us/library/ms912053.aspx

Here is an example for Moscow time zone (MSK). It's index is 145

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Microsoft\TimeZones\[B]145[/B]]
"Display"="GMT+4 Moscow"
"Dlt"="Russian Daylight Time"
"Std"="Russian Standard Time"
"TZI"=hex:\
10,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

Where do you obtain this? There are two ways:

1) The easy one. If you already installed MS updates on your PC, its registry already contains all that we need. Go under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\ and select appropriate key. (for Moscow it's under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Russian Standard Time). Export it and import to the device with your favorite registry editor (I use TotalCommander).

2) The hard one. Write it by yourself. OK...

All the fields are self-explanatory except TZI. Let's take a closer look on that. According to MSDN hxxp://msdn.microsoft.com/en-us/library/windows/desktop/ms725481%28v=vs.85%29.aspx, it's contains REG_TZI_FORMAT structure:

typedef struct _REG_TZI_FORMAT
{
LONG Bias;
LONG StandardBias;
LONG DaylightBias;
SYSTEMTIME StandardDate;
SYSTEMTIME DaylightDate;
} REG_TZI_FORMAT;

Bias is the offset in minutes, so that UTC = local time + bias

Since Moscow is UTC+4, the bias should be -4 hrs = -240 mins. -240 is 0xFFFFFF10 in hex, hence first 4 bytes of TZI are 10,ff,ff,ff

StandardBias is the bias during standard time (when DST don't apply): UTC = local time + bias + standard bias. So, it should be zero.

DaylightBias is the bias during daylight time: UTC = local time + bias + daylight bias. Should be zero for current Russian DST rules

Those two SYSTEMTIME fields contain dates when DST applies. They should be zero in our case. You can refer to the above link for details, if curious.

So, all you need to do is to just fill 4 first bytes with proper values.

OK, after registry is changed, you should be immediately able to see new time zone in clock settings. If that is not the case, try rebooting your device.

Now, maybe someone will create a cab for all Russian timezones... that would be nice.

---

Now Manila aka HTC Sense is the whole different story. It has its own city database with UTC offsets. The file in question is \Windows\2330fc3c_manila. This is actually an SQLite database file, so it can be edited easily. I use SQLite Database Browser (hxxp://sqlitebrowser.sourceforge.net), which is free. You can also use sqlite native console client.

So, you need to copy that file to the PC, find your city and change its timezone field. The file is in ROM, so you need a proper file manager to do that (TotalCommander is OK). E.g. for Moscow you should change -180 (UTC+3) to -240 (UTC+4).

Before writing the file back, Manila should be disabled. This can be done under Today settings (second tab, uncheck 'HTC Sense'). Replace the file and then enable Manila again.

I'll attach the patched file for HTC Rhodium aka TouchPro2. I'm not sure if it will suit other device or even other ROM on same device. Mine is T-Mobile v1.91.531.4