My application runs under ro-RO culture settings, configured in web.config globalization section. If I make a POST request like
POST /myapp/index
date=03-12-2010&value=something
the model binding maps this to correct date value of "03 December 2010", since the default datetime format for ro-RO culture is dd-MM-yyyy. If I change the request method to GET passing the same data the date value in my action becomes "12 March 2010" (MM-dd-yyyy datetime format)
GET /myapp/index?date=03-12-2010&value=something
$.getJSON('/Home/Index', $('form').serialize(), function(d) {
// ...
});
$.post('/Home/Index', $('form').serialize(), function(d) {
// ...
}, 'json');
So in this case "getJson" & "post" must return the same result, but I get different results because of datetime difference.
How can I enable the same parsing format for GET requests also?
I know I can use a more generic format such as yyyy-MM-dd for dates, but I am just curious why is this happening?