This is a migrated thread and some comments may be shown as answers.

What type the datetime is?UTC or Local

1 Answer 94 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
xiaofeng
Top achievements
Rank 1
xiaofeng asked on 31 Mar 2011, 03:09 AM
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!

1 Answer, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 31 Mar 2011, 08:16 AM
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
Tags
DatePicker
Asked by
xiaofeng
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
Share this question
or