How do I display a list of time zones and then set the time zone in windows mobile 6 using c#

I'm trying to find an easy way to display and set the timezone in my application running on windows mobile 6.1.  I don't want to use a third party .dll though.

Thanks in advance.
sbooth1117Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hjgodeCommented:
Hello

you have to use SetTimzomeInformation and GetTimeZoneInformation.

An (C#) example is here http://www.hjgode.de/wp/2010/10/08/windows-mobile-setsystemtime-and-dst-einsteins-relativity-theory/

The MSDN documenation is here http://msdn.microsoft.com/en-us/library/aa915071.aspx and   http://msdn.microsoft.com/en-us/library/aa908812.aspx

Remember, that the TimeZone names are dynamical. That means the list shown by the OS for setting the timezone is not provided by the OS, it is an example of names. You can show your own created  list of timezones with additional information like "GMT+1 (Frankfurt)" or whatever you want. The shown information is only a hint for the user. You can also simply list timezones with there vaues from -12 to +12.
If you use GetTimeZoneInformation, you will get only a generic StandardName returned by the OS. As MSDN says, the information is ignored by the OS when you use SetTimeZoneInformation.

You can see some TimeZone maps here http://worldtimezone.net/ and http://aa.usno.navy.mil/faq/docs/world_tzones.php

regards

Josef
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sbooth1117Author Commented:
I think that would probably work, but the O.S. displays a list of time zones already.  Is there not a way to use/get that list?
0
hjgodeCommented:
No, there is no way to get this list, you can just emulate it by using the same entries.

Possibly you may get it from the control panel app that builds the list, if the list is a resource or const var. But first you have to get the right cntpnl dll of the device. As it is a XIP file (in ROM), it is protected.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Smartphone Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.