Forcing date format strings - Windows Mobile Development and Hacking General

I got a problem with my calendar application, it uses a date format that's neither the long (17. October 2007) nor the short version (17.10.2007). Instead it uses a format with Roman numerals for month number, like 17. X 2007. The calendar app can't change this, it simply takes it from the OS, so is it possible to change it somehow, maybe in the registry?

Try using strftime (if you're using ANSI C) or GetDateFormat (Windows API). Changing the registry values will work, too, but that may change the way other apps present the date, which may not be what you want.

Related

[New release] Registry display plugin

Ok, most of you may find this totally useless as a plugin, but it was a combination of a request by user Treo_newb and a desire to create a sample plugin project that could be used as a base / example for plugin writers (I plan on doing an article on codeproject.com and this will be the source for it).
What does it do?
This plugin displays a string stored in registry.
The path is:
HKEY_CURRENT_USER\Software\RegDispPlugin
Value name: DisplayString
It checks if this string has changed several times per second when today screen is shown (as the system sends refresh message to all plugins) and displays the updated message if a change occurred.
What is it good for?
First, if you write apps using mortscript or similar like the user who requested this it will let your script display stuff on today screen.
Alternatively it could be used to mark your device today with a string that isn't as easily changed as user info.
The source is basically a skeleton plugin you can use to build your own plugin on (no license / copyright to limit you) and it already has several tricks needed for the plugin to display correctly:
VGA compatibility
Text size matching system settings
Proper header in settings dialog (like on system plugins)
Proper text color when selected (according to theme)
No blinking all today screen on change
Proper resize when switching between landscape and portrait
When I was writing my first plugin I could not find all these little fixes concentrated in a single article so I had to fish for each one as the bug reports came in.
Hope you will find this little project useful.
The plugin:View attachment RegDisplay.CAB
The source (eVC 4 project): View attachment RegDisplay.zip
Thanks for this!
Thank You Lev.
Thanks, Thanks, Thanks,
You are a legend.
I was almost through with my today plugin and was trying to figure out reading registry values and all of a sudden I get a PM from u about the plugin !!!
Very Cool !!!
OK a few questions,
1. I know that WM_TODAYCUSTOM_QUERYREFRESHCACHE is called for refreshing the today plugin, any ideas about when is it called.
I read somewhere that it was 2 seconds. Is it true?
2. I saw ur code and u have exposed CustomItemOptionsDlgProc in RegDisplay.def, but when I installed the cab file the 'options' is not enabled.
I manually changed the resistry and changed options to dword = 1 and saw ur name and email address.
u might want to enable that by default so that people can notice ur work.
I am planing a commercial release of a new project on basis of this.
Thanks again,
Shailesh
First, you're welcome.
shaileshashar:
1) I ran a debug print on this message once on an iPaq 1710 and it seems to be sent several times per second. This could differ from OS to OS or even from device to device, I am not sure.
If you need specifically timed refresh, or you have an event triggered on new data, I suggest using a timer or maybe a thread that will wait on an event. You can refresh your plugin from anywhere in code by calling InvalidateRect with your window handle.
2) I messed up the cab at first, forgetting to add the Options reg value. Then when I went to upload the fix, I couldn't access the site for about an hour (no idea why, I even rebooted the PC to Ubuntu). Should be fixed now, but I will check it later again (I have to go back to XP for that).
Good luck with your program.
Suggestion
levenum said:
First, you're welcome.
shaileshashar:
1) I ran a debug print on this message once on an iPaq 1710 and it seems to be sent several times per second. This could differ from OS to OS or even from device to device, I am not sure.
If you need specifically timed refresh, or you have an event triggered on new data, I suggest using a timer or maybe a thread that will wait on an event. You can refresh your plugin from anywhere in code by calling InvalidateRect with your window handle.
2) I messed up the cab at first, forgetting to add the Options reg value. Then when I went to upload the fix, I couldn't access the site for about an hour (no idea why, I even rebooted the PC to Ubuntu). Should be fixed now, but I will check it later again (I have to go back to XP for that).
Good luck with your program.
Click to expand...
Click to collapse
Thanks for the help, will check the fixed cab.
Also a suggestion:
A custom icon could also be incorporated. You can give a option to load a custom icon next to the text in the today plugin.
I know anybody can modify ur code and do it but still.
Actually, I probably should have mentioned this in the original post but I have no intention of adding options to this thing.
This would only complicate the code and turn it in to an actual app instead of a sample project.
But by all means feel free to make suggestions. If this thing does become popular, when I am done with my other projects (like LVMTopBat) which won't be any time soon (unfortunately) I will release a separate version of this plugin with all kinds of options that can be controlled both by user (form the options dialog) and by other apps through registry.
Maybe things like text alignment, size, bold / Italic / underlined.
P.S.
The reason I put the string this plugin loads under HKEY_CURRENT_USER instead of the HKLM where the rest of the plugin registry resides is because by default the HKEY_LOCAL_MACHINE on WM 5 and higher has a security restriction. For example you can not write to it using RAPI, only by authorized (or signed) app on the device. The HKEY_CURRENT_USER on the other hand is open for all.
levenum said:
P.S.
The reason I put the string this plugin loads under HKEY_CURRENT_USER instead of the HKLM where the rest of the plugin registry resides is because by default the HKEY_LOCAL_MACHINE on WM 5 and higher has a security restriction. For example you can not write to it using RAPI, only by authorized (or signed) app on the device. The HKEY_CURRENT_USER on the other hand is open for all.
Click to expand...
Click to collapse
Thanks for the info, I never knew that.
Thank you so much! This was exactly what I was looking for!
levenum said:
...But by all means feel free to make suggestions.
Click to expand...
Click to collapse
As a frequent mortscript user I think, this great app might be even more usefull, if the string was shown in an "allways on top" message box instead of the today screen. The Today screen might be obscured by other active windows during the scripts runtime and the plugin eats precious today screen estate also while being unused, doesn't it?
In that case (of a standalone application) I would furthermore introduce some kind of termination string (or reg. value) to end the display application.
Code:
- start mortscript
- writes first string to registry
- starts display application (run)
- updates string in registry whenever appropriate
- ...
- writes termination string to registry
-> display applications self-terminates
- ...
- end of mortscript
Honestly, I already do use something comparable with mortscript (employing a conditioned sleepmessage loop and reading from the registry too), but this could be much nicer and more elegant.
Just my 2 cents... What do you think?
I think something like that would be better implemented by the mortsrit program it self.
It could be a function like MessageBox API in windows which you could then command on and off. Having it built in would save precious resources on the device that would be wasted by having an extra app run constantly in background.
This is just my thought though.
I'd suggest contacting the developer of mortscript and discussing it with him.
levenum said:
I think something like that would be better implemented by the mortsrit program it self.
...
I'd suggest contacting the developer of mortscript and discussing it with him.
Click to expand...
Click to collapse
Mort knew about that request and by chance just announced to so.
Thanks anyway.
Hello levenum,
I just joined the community. Reason being, I found your RegDisplay plug-in
You call it a sample project, but the impact is that of an awesome solution.
Great for MortScript, but equally useful in BASIC applications that write
messages to the registry which is show upon screen minimization.
I regret not being a C programmer (mainly BASIC), else I'd love to further
develop this jewel.
Your plug-in runs flawlessly in an iPAQ 210 under WM6 Classic.
Cheers and Respectful Greetings
Robert
CLSID for registry display plugin
What is the CLSID for the Registry Display Plugin? I am going to have to edit the XML file that defines my home screen in order to get the plugin to show up. I am using Facade to control my home screen, and the only plugins that it will show in its list are those currently in use in one of the XML files in the Application Data\Home folder. All other new plugins require editing the XML. Thanks for your help.
levenum said:
Ok, most of you may find this totally useless as a plugin, but it was a combination of a request by user Treo_newb and a desire to create a sample plugin project that could be used as a base / example for plugin writers (I plan on doing an article on codeproject.com and this will be the source for it).
What does it do?
This plugin displays a string stored in registry.
The path is:
HKEY_CURRENT_USER\Software\RegDispPlugin
Value name: DisplayString
It checks if this string has changed several times per second when today screen is shown (as the system sends refresh message to all plugins) and displays the updated message if a change occurred.
What is it good for?
First, if you write apps using mortscript or similar like the user who requested this it will let your script display stuff on today screen.
Alternatively it could be used to mark your device today with a string that isn't as easily changed as user info.
The source is basically a skeleton plugin you can use to build your own plugin on (no license / copyright to limit you) and it already has several tricks needed for the plugin to display correctly:
VGA compatibility
Text size matching system settings
Proper header in settings dialog (like on system plugins)
Proper text color when selected (according to theme)
No blinking all today screen on change
Proper resize when switching between landscape and portrait
When I was writing my first plugin I could not find all these little fixes concentrated in a single article so I had to fish for each one as the bug reports came in.
Hope you will find this little project useful.
The plugin:View attachment 41592
The source (eVC 4 project): View attachment 41583
Click to expand...
Click to collapse
This is great! I was asked if I could write a today screen plug-in for my weather application (http://forum.xda-developers.com/showthread.php?t=445576) - I couldn't since I don't have the skills and I'm writing .NET code - but this is exactly what I needed.
I'm adding support for this plug-in and will of course give credits to you.

TimeZoneInformation hacking ...

I know how to hack the TimeZones in Windows OS family (98 to XP). But I am having dificult to do the same in WM6.
This is what I found:
1) HKLM\Time has a TimeZoneInformation value (binary). It seems to be the active time zone rules (set by SDK functions).
2) HKLM\Software\Microsoft\Clock has some values I don't understand.
3) I am brazilian and I am using "GMT-3 Brasilia". I cannot find that text in the registry. Not ever "GMT". Is it hardcoded?
I want to change the "GMT?????????" rules. In Windows, everything is in the registry. In WM, I don't know.
Any hints are welcome.
Júlio
The timezones in WM have a bit of a different structure.
1) The HKLM\Time TimeZoneInformation is the active time zone. It is a structure described here (you need some understanding of C/C++ data types to fully understand this).
2) The HKLM\Software\Microsoft\Clock just holds the settings for the clock app and is irrelevant in this case.
3) The timezones are listed by code, not names. Here is the full table. Note however that usually they are not stored in registry but only in the wince.nls file (that contains defaults for all regional settings). Only when a change to the timezone information is made it is placed in registry with the code as the key name.
levenum said:
Only when a change to the timezone information is made it is placed in registry with the code as the key name.
Click to expand...
Click to collapse
Items 1 and 2 are Ok. I am familiar with TimeZoneInformation structure.
But focusing on item 3: wince.nls is binary and not writeable. What change should I do? Could you explain the quoted text?
Cheers.
Júlio

Git-er-Done (GTD for PPC)

I'm working on a GTD system for Windows Mobile. My thinking is that, since I always have my phone with me, what better place to maintain a "trusted system"? I've seen make-shift systems based on Outlook Tasks, ListPro, etc., but none of them were right for me. They were either too inflexible, not robust enough or too cumbersome.
My goal is to make it as simple as possible - but no simpler. With that design goal in mind, I'm making it tag-based. No need for category, priority, or context fields - just use tags... @Home, @work, ASAP, Wait4, @errands, Business Hours, Home Maintenance, Auto Maintenance, etc.
Planned functionality...
MAIN MENU
Quick-Add Item (description only - auto-tagged with "TagL8r" for subsequent review/edit)
Add Item (including tags, and notes - with an option (future release) to auto-timestamp the creation date in the Notes field)
Quick-Find Item (Enter a search term, see a list of records that include that text anywhere in the record (i.e. in any field). Primarily used when there's something you don't want to forget - but you can't remember if you entered it already.)
View Items by Tag (Future release will include code so multiple tags can be used as a view (and possibly add-items) filter.)
View Untagged Items (Finds items tagged "TagL8r" - select item to add tags)
Mark items complete (one button - optionally including auto date/time stamp in Notes field.)
View Completed Items (Finds items tagged "TagL8r" - select item to add tags)
Manage Tags (future release)
Backup Data (via ActiveSync - database files must reside in \My Documents for this release; additional options planned for future release)
Skinnable (future release)
UPDATE:
I tackled this this using AutoHotkeyCE with a flat-file database. (I'm not a C programmer. And Mortscript's GUI functionality is woefully inadequate.)
This has gone badly. After 6 weeks, 10-12 (and sometimes more) hours per day, 6 (and often 7) days a week, I have an app that gets buggier the more I try to fix it.
While great for simple desktop automation tasks, AutoHotkey is (IMHO) not well-suited to sophisticated, GUI apps. (It has the chops - or at least the desktop version does -but the CE port is buggy and the syntax is incredibly counterintuitive.) In short, it has been an exercise in futility and terribly frustrating. I wish I had chosen any other scripting language (even Perl) for this, but for WM, my options were limited. (If there was a good implementation of php for PPC, I'd have been all over that, but sadly, the only such implementation was abandoned long ago.)
Bottom line, I will still be doing this, but I'll be doing it in C# or C++ (kind of a learn-as-I-go proposition.) When it's done, I'll certainly be posting it here, but after 6 weeks of very hard work, my neglected wife needs some attention. And with nothing to show for all my hard work, I need a bit of a break. Then there's the learning curve of a new language.
For now, though, I'm posting the main help file (PPC friendly) - with screenshots - as a sort of "sneak preview". Your comments and feedback are welcome.
Hi,
I'm waiting for your prog. Please make sure tags are outlook categories: I'm using GTD programs on my PC too, like jello-dashboard, and they relly on category to sync.
Thanks
This is totally separate from Outlook and I had no plans for integration. All data is stored in a flat-file database, but if you keep that file in My Documents, it should sync without problem. The entire app should work on the desktop as well as the PPC, though. And I'll optimize the desktop version to take advantage of the larger screen. This may be a deal breaker for you, I don't know. Then again, maybe you'll like it well enough to switch over. I'll certainly be open to enhancement requests, especially for the desktop version. If there are particular features that you really like in your desktop GTD app that I'm not implementing, I'll definitely consider adding them.
One other thing re: Outlook categories... I'd be glad to implement an import feature but I don't know how to access the system db that contains the Outlook categories. I've asked (on this forum) if there's a commandline util for doing so (and where to find a schema) but no one has ever answered either question.
Have a look at MLO http://www.mylifeorganized.net/products/my-life-organized/how-it-works.htm
I have. I believe my app will be better. Quicker/easier to add to my "Inbox", quicker/easier to sort/organize, quicker/easier to review/set priorities & action items, and in general, a whole lot more flexible. (Not to mention $77.95 cheaper!)
Sorry for the delay!
To those who have been watching/waiting for this, I apologize for the delay. I initially wrote the QuickAdd and QuickFind functions in Mortscript but then decided I wanted all the code in AHKCE, so there's been a bit of a rewrite and some problems with the port to AHKCE (some my fault, one apparently a bug.) And now there may be further delays as life (or maybe I should say "wife") is getting in the way.
Well all my GTD systems are based around outlook/exchange. Not using category, and using your own database to sync with the pc is going way back for me, at a time where I can sync between 7 devices with ease, using the same mail, contact, task and schedule database, and still access this data over internet.
Google might be another repository, but a GTD without any form of MAIN internet sync looks so Pocket pc 2003 to me.
But I'm sure you might reconsidere this, specially if you see that using standard outlook database with tags allow you to communicate with any PC part with ease, without reprograming your own.
This would be fantastic. Like you said, since the flat-file db can be file synced, it's all good. May could even bend it into a format that todo.sh/txt could handle!
Anyway, looking forward to it's release.
I don't really see your point
But I'm sure you might reconsidere this, specially if you see that using standard outlook database with tags allow you to communicate with any PC part with ease, without reprograming your own.
Click to expand...
Click to collapse
I've read about (and tried using) the Outlook method, with categories as tags. Didn't work for me. Outlook is a kludge. It wasn't designed specifically for GTD, isn't extendable, and is lacking in several areas. I found it cumbersome - Not quick to add an item to my inbox (or at least not nearly as quick as my app.) Not quick to add new categories as needed. Not quick to find multiple items with the same tag(s) (which could be items tagged "today" or with a context tag - mine will display such lists very quickly.) And not as quick to change to edit mode for items found via search.
Aside from all that, I don't use Outlook at all. I much prefer Thunderbird on my desktop, and Gmail forwards all mail to my phone via (push) web2mail.
thaihugo said:
at a time where I can sync between 7 devices with ease, using the same mail, contact, task and schedule database, and still access this data over internet.
Click to expand...
Click to collapse
Why would you need to sync with 7 devices?! You're placing a lot of emphasis on syncing. I'm not. This is phone-centric because I always have my phone with me. Yet I can still sync to my desktop (for entering long notes, etc.) using ActiveSync - by keeping the db file in \My Documents.
If the syncing issue outweighs the benefits of my app for you, I guess you won't be using my app. If syncing via Outlook Tasks is a priority for you, consider writing something that imports the dbfile into Outlook tasks.
defsquad said:
bend it into a format that todo.sh/txt could handle!
Click to expand...
Click to collapse
Shouldn't be that hard to support. Does it store it's data in a single text file?
Soon!
Excellent progress so far today. Just a bit of wrap-up to do and then I'll post v0.1 beta 1. But it'll have to wait til tonight - gotta run some errands, and appease the wife by doing some chores that have been put off due to this project!
This sounds great!
The thing i miss about Listpro is, ability to mark some ithems as "outlook tasks", so they show up in other programs, calender, etc. Just at suggestion.
I doubt I can do this from AutoHotkey or Mortscript. I would have to call some sort of commandline utility like
OutlookCreate.exe -item=appointment -subject=[subject] -date=[date] -time=[time] -reminder=[reminder]
As far as I know, this doesn't exist but if anyone knows of one (or wants to write one), I could certainly implement this functionality.
I do plan to implement a reminder function that would optionally set a system alarm for the current item/new items.
Status Update
For those watching this thread/interested in this app, I've posted an update (the news is not good) in the 1st post, along with the main help file (with screenshots) as a sort of "sneak preview". Sorry if this has become vaporware.
Oops. Forgot to include linked images (screenshots) when I uploaded the help file. Reuploaded. See 1st post.
One thing you might try is to Tweak an App like bLADEwiki to do GTD.
Good Luck in your GTD and C programming !
Does it working?
Hi Donny
I tried to install you software but it did not work. Maybe I did not try enough.
Half year ago I had a same dispute. Mortscript or Autohotkey? Morscript was winner, however it has not pretty gui windows, it has better scripting. So I created Plain todo. I use it every day: www.plaintodo.com

change manila calendar categories?

hi!
I searched the forum for that and found only unanswered theads.
when you create a new appointment in the manila calendar, it only offers me a set of default categories. synced events as well as the basic pocket outlook offer me all I use.
so, how to edit the manila calendar categories? thanks a lot
I think you have to do that from Outlook on your PC. Just add the categories there and they should appear on your phone after sync.
You can use the standard WM6.5 calendar app in the start menu (Outlook>Calendar)
No idea why they overlooked the ability to do this.
yep, I know, I use PocketInformant anyways, but I thought about replacing it with Manila Calendar + MyLife Organized.
too bad that won't happen...maybe we can edit the Lua script?
Looking around the web and forums like the thread "Manila 2.5 Calendar Categories" in this forum there is actually no way to add / remove a category using the HTC Calendar. The only possibility is to use the wm 6.5 calendar as mr_Ray said above.
Maybe there is somewhere a registry key for the build in categories but I didn't found a Tweak yet
Change (patch) manila calendar categories
Hello everyone,
after investigating several hours to find out if it is possible to change the categories provided in HTC calendar, I found a small solution working for me. Perhaps this is a point to start for other coders to write a little app for users which if more comfortable... Here is a summary:
The facts:
- at the moment it is NOT possible to add/delete categories using HTC calendar frontend (HTC Manila Core: v2.5.20184125.1 Artemis ROM 33.1)
- the only option to do this is using the classic calendar frontend (outlook) provided by WM 6.5
- HTC calendar provides out of the box only 4 default categories ("None", "Business", "Holiday", "Personal" and "Seasonal")
- HTC calendar shows other categories (e.g. synced with outlook or created with pocket outlook) correctly but if you edit such an event the category will get lost (will be replaced with "None" when saving an event)
- the categories provided in HTC calendar are hardcoded in the mui-file (Language-Specific Resource File) of HTCAppointment.exe
As the categories are hardcoded it is IMHO improbably that HTC will fix this problem in near future.
Start point for patches:
- the mui-file of HTCAppointment.exe is digitally signed from HTC so that you could not modify the file directly
- using File Editor Suite or delcert it is possible to remove the digital sign from the mui-file
- then the file can be eddied / modified using ResHacker provided in File Editor Suite or Restorator
- HTC did not spend much energy to implement a cleaver algorithm because the categories which are hardcoded in mui-file of HTCAppointment.exe are matched using string-comparison
- so you can change the five default categories to whatever you want, but it is NOT possible to add further categories, as they are referenced from calendar application with a fixed array number
- here is an example: array number 1241 provides category "None" the default; array number 1242 provides "Business" and so on
Proof of concept:
- I removed the digital sign from HTCAppointment.exe.0407.mui
- I changed the five default categories to some others
- I replaced the original mui file with the patched file
- I can select the new categories in HTC-Calendar
- I build a cab-file so that the original mui file can be restored
Startpoint for an application:
- the application must be able to remove the digital sign from the mui-file
- the application must provide a little gui which shows the five categories and offers the possibility to change them
- the application must be able to save the changed values into that mui-file afterwards
--> Coders could start here
Other threads regarding categories from manila 2.5:
- Change Calendar Category so can fully use Multiple Google Calendars
- Manila 2.5 Calendar Categories
Works...
I just tried this... and:
-took me a while before I found the hidden mui file via activesync in the windows folder (show hidden/system files)
-unsign went well as soon as I figured out that the file was readonly
-editing gave no problems. compile string, save etc.
-overwriting a system file in the windows folder did not work. tried to change attributes but that didn't work either. So I tried the CAB idea.
"How To make a .cab file ??" on this forum proposes QuickCab 1.0.zip
Now I have new categories... but there is still a problem: the strings are merged: I have:
Cat 1|Cat 2|Cat 3|Cat 4|Cat 5
Cat 2|Cat 3|Cat 4|Cat 5
Cat 3|Cat 4|Cat 5
Cat 4|Cat 5
Cat 5
I looks like I accidently deleted a string terminator. The only usefull category is the last.
I had used the File Editor Suite - ResHacker.
I did it all over again but now I added a space (char0x20) at the end of each string. Then after saving I bin-edited the mui file to change the 0x20 in 0x00.
wow... finally...
Edit categories
Then after saving I bin-edited the mui file to change the 0x20 in 0x00.
Click to expand...
Click to collapse
How did you make this ? It's very difficult, because the file is in unicode.
Use any hex/bin file editor you like (or type hex editor in google) to restore the deleted null (ascii 0) characters in the mui file that were removed while editing the values in a text-based resource editor.
I used pspad_hex.
dewagter said:
-overwriting a system file in the windows folder did not work. tried to change attributes but that didn't work either. So I tried the CAB idea.
Click to expand...
Click to collapse
I could overwrite the cab file in windows directory but maybe because I used Artemis ROM and not an official ROM....
But as you mentioned the cab idea should work everytime.
dewagter said:
I looks like I accidently deleted a string terminator. The only usefull category is the last.
Click to expand...
Click to collapse
I used a portable version of Restorator (google Restorator 2007 3.70.1747 Portable.exe) which shows the delimiter at the end \0x00. One example for a category in Restorator is "Birthday\0x00"
In this thread I got an answer from a user who pointed out that "all the custom ROMs let you change it under the options without the help of any tool" but Artemis does not allow this for know... and I did not get any answer for my comment on that.

[Q] Timezone changing via registry and automatic time readjustment (WinMo 6.1 Pro)

Hello everyone,
Well I revert to the wisdom of these forums after trying to solve an issue on a Motorola MC75 that runs WinMo 6.1 Pro.
Specifically I want to change the timezone and get the clock to automatically readjust. So if time is 11:00 AM and timezone is GMT+0 if i change to timezone GMT-1 I want the clock to go back 1 hour to 10:00 AM. This works fine using "Clock.exe" that is supplied with WinMo 6.1 Pro.
The tricky part however is that I do not want to use "Clock.exe". I want to either make the change via the registry or using some other application that accepts command line parameters for example "setclock.exe -timezone gmt-7" (this application should also readjust the time).
Since I haven't found any time/clock/timezone application to do this I have been trying to apply registry changes. Attached I am including two registry files with the registry keys for GMT+0 and GMT-1. I am applying/merging these registry settings using "regmerge.exe" that comes with Motorola MC75 devices.
Now, when I change the timezone using these registry files, the timezone is in fact changed and I confirm this via "Clock.exe" however the time is never re-adjusted.
If I run an NTP application that synchronizes the time with an NTP server, time is also not readjusted it is maintained exactly according to the previous timezone.
It seems that when I make the change via the registry, the timezone is altered (confirmed via clock.exe) however it is in fact not applied all over the OS. I therefore tried warm and cold booting the device however this also didn't work. I also tried running an NTP sync after warm booting and it also didn't work.
So it seems to me that when one changes the timezone using "Clock.exe" it not only changes the registry keys but also applies the change all over the OS and therefore readjusts the time or does some other change that I am not aware of.
I come to this conclusion because of the following. Say my device initially has as time 11:00 AM and timezone GMT+0. When I change to GMT-1 via registry files, my timezone is in fact changed but the time is maintained at 11:00 AM.
Now say I via "Clock.exe" change the timezone to say GMT-8, press ok and apply the changes. The time here will readjust. If I now change back to GMT-1 my clock will revert back to the old time 11:00 AM. At this point if I finally run a NTP sync application my clock is correctly changed to 10:00 AM.
Well I apologize for the long post but I really have to make sure my problem is well understood. If anyone has any suggestions or ideas please do share them with me.
Many thanks,
icebrian
Setting time
Try checking out the OpenNetCF libraries. It is open source. There is a companion tool that I am running from my PC while I have the PDA connected called psynctime.exe
This tool allows me to synchronize my PC time with the PDA time and I have confirmed that it does in fact change the device time. If you can look at the source code for this executable you can see what calls they are making in the device to set the time.
Hi dchapma1, Thanks for your reply. It was indeed helpfull. From what I gathered in the source code time is actually manually recalculated so that minutes are added or subtracted from the current time. Then finally various other registry key's are changed with hexadecimal keys. It seems that the process is mostly manual and that basically gave me the idea if also doing this same process.
Basically I set various registry keys via the registry files, then I sync the readjusted time to the device then I force a reboot. From there on timezone has aparently been aplied and if I use a NTP application time is correctly maintained.
Seems as thou this is my only option. Once again thanks for the input.
Regards

Categories

Resources