What type the datetime is?UTC or Local

2 posts, 0 answers
  1. xiaofeng
    xiaofeng avatar
    60 posts
    Member since:
    Jun 2008

    Posted 30 Mar 2011 Link to this post

    I set current date to the date control When first opening my application .
    The code is this.
    dtpBookDate.SelectedDate = DateTime.Today
    Then I just get the date value of the datepicker ,and pass the datetime to WCF service
    I get the value of datepicker like this:
    dtpBookDate.SelectedDate.Value
    Our client's computer and server's computer are not at the same time zone.But When the service get the value ,the datetime is worng.It become the yesterday ,and it has a time difference.But after I change the value of datepicker manually,I do the same thing that send the datetime to the WCF service,It is right.There is no time difference.It is very strange.

    So I think the default date type of the datepicker maybe a UTC?
    Help!
    Thank  you!
  2. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 31 Mar 2011 Link to this post

    Hello xiaofeng,

    Can you perform the same test case by using the SelectedValue instead the SelectedDate. Let us know if the problem still appears.

    All the best,
    Kaloyan
    the Telerik team
  3. DevCraft banner
Back to Top