The code below works fine on local machine. On the other side, on server, it shifts date 1 day left.
JsonSerializer serializer = new JsonSerializer();
serializer.Converters.Add(new JavaScriptDateTimeConverter());
The value returning from database is: 2010-09-16 00:00:00.000
JsonSerializer gives 2010-09-16 on local and gives 2010-09-15 on server..
any ideas?
To clarify the problem i made a simple test;
string str = JsonConvert.SerializeObject(Convert.ToDateTime("2010-09-16 00:00:00.000"), new JavaScriptDateTimeConverter());
Response.Write(str);
this code produce different results on different machines.. Why?
new Date(1284584400000) and new Date(1284588000000) or
Wed Sep 15 2010 23:00:00 and Thu Sep 16 2010 00:00:00