SignalR datetime format
signalr
Solution
Keep in mind that client times can be VASTLY different than server times due to time zones/clients modifying clocks etc. That being said:
C#:
Caller.ShowDate(DateTime.UtcNow);
JavaScript:
myHub.client.ShowDate = function(d) {
var serverTime = new Date(d); // The Server Time in JavaScript
}
Problem
I'm using SignalR in my server side code c# .net4. On client I'm using javascript. when I Invoke client method from server ,for example ``` Caller.ShowDate(DateTime.Now); ``` client side javascript gets value of "2012-11-13T19:02:39.3386544+02:00" as string. How can I use It as Date in javascript ?