Home/Visiting Clock in windows mobile

  • Thread starter Thread starter ssn
  • Start date Start date
S

ssn

I need to retrieve the device time set in the clock application in windows
mobile
Is there an API to retrieve both the Home as well as the Visiting time.
Or is there any other way by which I can retrieve the date/time values set
for home/visiting
 
I would presume that the two timezones are saved in the registry. The
'standard' way to find them would be to export the registry using Remote
Registry Editor and then make a change via the UI in the Date/Time applet,
then export the registry again and compare the before and after to identify
the difference. The current time would be accessible via DateTime.Now for
the selected one, Home or Visiting, or through a P/Invoke of GetLocalTime().

Paul T.
 
Hi Paul,
I am able to see the changes in the registry.
I am able to get the time using DateTime.Now if either is selected.
But how do I get both the times programmatically at a time to display it on
a form.
 
Hi Paul,
I am able to see the changes in the registry.
I am able to get the time using DateTime.Now if either is selected.
But how do I get both the times programmatically at a time to display it on
a form.
How do I programmatically change the selection from Home to Visiting and
then use DateTime.Now ?
 
How are the registry entries stored? Perhaps an offset? You'll call
DateTime.Now for one and then use the offset to calculate the other.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
 
Yes, I doubt that there are two times. Certainly the OS doesn't maintain
two separate clocks. If you get the local time, and get the information
about the time zones for both Home and Visitor and which one is currently
selected, you should be able to calculate the other.

Paul T.
 
There is a breakdown here of how the settings are stored in the registry:-
http://mobileworld.appamundi.com/bl...-visiting-clocks-in-professional-edition.aspx
The data contains the indexes of the timezones in the POOM timezone
collection. I've yet to see whether it is possible to update these settings
programmatically.

Peter

--
Peter Foot
Microsoft Device Application Development MVP
peterfoot.net | appamundi.com | inthehand.com
APPA Mundi Ltd - software solutions for a mobile world
In The Hand Ltd - .NET Components for Mobility
 
Hello Paul,
I am able to get the local time. The information about the timezone index
set for home and visiting and which one is currenlty selected are retrieved
from AppInfo in the registry.
However I am not able to convert this local time to the time set for the
visiting timezone.
e.g. visiting timezone index i get as 4. How do i get the time retrieved
using DateTime.Now to a time for the timezone index 4.

Regards,
 
It appears to me (I'm not a full-time Windows Mobile guy and time zones are
set up differently on Windows Mobile than on the basic Windows CE operating
system), that you can use a COM object IPOutlookApp to get information about
the Home and Visiting time zones. In particular,
GetTimeZoneInformationFromIndex().

Paul T.
 
Hello Paul,

Using GetTimeZoneInformationFromIndex() gives me the information about the
bias and other details to calculate the time for the particular timezone.
How do I get the information related to the city name?
MSDN references point to Citylist.csv and Timezones.csv files use for
windows mobile 6. But these files are missing from the SDK.
How do I get the information of the city name for a timezone index?

Thanks and Regards,
ssn
 
I've never used it... It looks to me, though, if you consult the help of
IPOutlookApp, you'll find GetTimeZoneInformationFromIndex(). The
TIME_ZONE_INFORMATION structure contains the standard time and daylight time
names for the time zone.

Paul T.
 
Hello Paul,

Using GetTimeZoneInformationFromIndex() gives me the information about the
bias and other details to calculate the time for the particular timezone.
How do I get the information related to the city name?
MSDN references point to Citylist.csv and Timezones.csv files use for
windows mobile 6. But these files are missing from the SDK.
How do I get the information of the city name for a timezone index?

Thanks and Regards,
ssn

check if this helps
http://msdn.microsoft.com/en-us/library/aa908167.aspx
 
Back
Top