How do I get a date in Silverlight?
from the title seems like a silly question :) I know, but I have a silverlight application that needs to send datetime to 3rdparty web method and based on datetime fill some client side controls ... now I know how to get datetime from client. but the problem is that the client's time might be wrong ........ one method is to use a webservice to get any other idea in the future?
a source to share
If you want server time reliability, then yes - a web service will suffice. I recently came across a Silverlight limitation that would only allow a web service (WCF or otherwise). I chose a regular .NET webservice for my scenario and when all was said and done it worked like a charm.
a source to share
More specifically about your scenario. What do you mean by "client time"?
If you mean that the client time may differ from the server time due to a world time difference (for example, a client that is accessed from the US while the server is in the UK), you need to make sure you convert your time in Universal Time , calling DateTime.ToUniversalTime()
before sending.
a source to share