Hi,
in Silverligh + RIA app, I am retriving date from mssql08 server, when it reaches client side it is automatically converted into UTC time.
How can I prevent RIA or SL from doing that?
Regards MK
Hi,
in Silverligh + RIA app, I am retriving date from mssql08 server, when it reaches client side it is automatically converted into UTC time.
How can I prevent RIA or SL from doing that?
Regards MK
A well-written application will store dates in UTC format, and convert them into the appropriate culture or locale format, depending on the regional settings on the client. Therefore, I'm not actually sure what your question is.
How are you storing the data in your database (is it a SQL 2008 db? No such thing as a SQL 09)? If you are storing it as a varchar, and you're entering it with the timezone notation, like so:
"2009-10-03T12:00:00Z"
Then you're actually storing the date as a UTC time, and the Silverlight app reads it this way; this can cause date conversion errors. I beleive you can run into the same problem using the the new datetimeoffset datatype in SQL Server, but I haven't tested it.
As Randolph says, a well-written application will store the dates in UTC format. Use the culture format to convert back to your local settings...