A couple of options:
Send the date down from the server as a string rather than a DateTime object.
Use a custom formatter for jqgrid that converts the DateTime javascript object to UTC time. I recommend using moment.js
Here is my custom date formatter in javascript:
function utcDateFormatter(cellvalue, options, rowObject) {
if (cellvalue) {
return moment(cellvalue).utc().format("MM/DD/YYYY");
} else {
return '';
}
}
Add this to your colmodel:
formatter: utcDateFormatter
I was also using Entity Framework on the server side which was also converting the DateTime fields coming from the database to local server time. Check to make sure the DateTime isn't being converted both on the server and client (it won't creep it's head until server/client timezones are different).
Here's a good article: http://www.hanselman.com/blog/OnTheNightmareThatIsJSONDatesPlusJSONNETAndASPNETWebAPI.aspx
Specifically check out how he uses PowerShell convert json datetime to regular datetime for debugging purposes:
PS C:\> (new-object DateTime(1970,1,1,0,0,0,0)).AddMilliseconds(1330848000000).AddHours(-8)
Sunday, March 04, 2012 12:00:00 AM
EDIT:
Here's my full model for a datetime column:
{
name: 'StatusDateUtc',
index: 'StatusDateUtc',
width: 140,
align: 'left',
editable: true,
formatter: utcDateFormatter,
sorttype: 'date',
editoptions: {
dataInit: function(elem) {
$(elem).datepicker({
changeMonth: true,
changeYear: true,
showButtonPanel: true
});
}
}
}