Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8637851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:34:42+00:00 2026-06-12T10:34:42+00:00

I am using Windows Mobile 6.5 SDK with C# 3.5. I need to change

  • 0

I am using Windows Mobile 6.5 SDK with C# 3.5. I need to change the mobile date/time with Server(ASP.NET) date/time. I am unable to find anything.

Update: I am dealing with the timezone issue. If server and client are on same timezone then I have no issue. But if timezone differs I am facing issue.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T10:34:43+00:00Added an answer on June 12, 2026 at 10:34 am

    Changing the time on the mobile isn’t hard – the openNETCF helper makes it easier otherwise you need to do something like:

        // Compiling for Windows Mobile
        [DllImport("coredll.dll")]
        static extern bool SetLocalTime(ref SYSTEMTIME time);
    
        private void SetTime()
        {
            SYSTEMTIME st;
    
            // Thanks to Jim Hollenhorst <hollenho@attbi.com>
            DateTime trts = DateTime.Now.AddMilliseconds(LocalClockOffset);
    
    
            st.year = (short)trts.Year;
            st.month = (short)trts.Month;
            st.dayOfWeek = (short)trts.DayOfWeek;
            st.day = (short)trts.Day;
            st.hour = (short)trts.Hour;
            st.minute = (short)trts.Minute;
            st.second = (short)trts.Second;
            st.milliseconds = (short)trts.Millisecond;
    
            SetLocalTime(ref st);
        }
    

    Where SYSTEMTIME is:

        private struct SYSTEMTIME
        {
            public short year;
            public short month;
            public short dayOfWeek;
            public short day;
            public short hour;
            public short minute;
            public short second;
            public short milliseconds;
        }
    

    And LocalClockOffset is the pre-calculated difference between the desired time and the current time.

    The other part of your query is now to sync with the server. If you sync your server to say time-a.nist.gov, then you could also sync your mobiles to the same.

    Valer Bocan has excellent code for this which is where the above came from. Link : http://www.bocan.ro/sntpclient

    I’ve not done this but it’s probably possible to have your server also act as a time server and instead point your mobiles to your server instead and use the same protocol ?

    Lastly timezones – with my PDA projects i’ve been passing datetimes as GMT with the +/- offset from GMT.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm connecting a Windows Mobile to MsSql server 2005 using System.SqlClient It works great
I'm developing an winform application for Windows Mobile 5.0 and above. I'm using .Net
I want to use gestures on a windows mobile phone. For example (using .net
I am developing a Windows Mobile application using WM6 SDK. The application is a
I'm developing a application for Windows Mobile using C#(.Net Compact Framework 3.5), but I
Looking for a control for selecting a directory in Windows Mobile (using .NET Compact
I connect my windows mobile app directly to ms-sql server using the sqlclient dll
I'm developing a turn-by-turn navigation software for Windows Mobile using C# and .NET CF.
How do I change the region to (English) Australia on Windows Mobile using C#?
I am developing an Hybrid Mobile app using Windows Phone 7 sdk and phonegap.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.