wcf service unable to parse datetime from javascript running in ie

I have a WCF service with a method defined like so: Public Function GetScene(cameraId As Integer, time As Date, bufferSize As Integer) As Scene and javascript that looks like this: time = new Date("04/09/2013 23:59") $.getJSON('../Services/CameraViewerService.svc/GetPreviousScene', 'cameraId=' + _cameraId + '&time=' + time.toUTCString() + '&bufferSize=20', function () {...}); in chrome and firefox the date in the query string ends up looking like this: `Tue, 09 Apr 2013 23:59:00 GMT` and the WCF service consumes it just fine, but when I use internet explorer 9 the date in the query string looks like this: `Tue, 9 Apr 2013 23:59:00 UTC` and the WCF service throws an exception: `The string was not recognized as a valid DateTime. There is an unknown word starting at index 26.` What is the best way to get this to work for all browsers?

以上就是wcf service unable to parse datetime from javascript running in ie的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏