I was testing my new SharePoint list. One of my list item entries is based on Date();. When I enter the data into Chrome, it has the "GMT-0500 (Eastern Standard Time)" and in IE, the GMT is not there. Is there away to strip the GMT in Chrome?
It seems the default behavior since the implementation of date parse function differs across browsers.
Chrome assumes they're in UTC while IE assumes they're local to the user.
Please see the similar posts below.
As you look into it more I think you'll find that there are many differences that can be found between how different browsers and operating systems report
new Date().toString(). For that reason I wouldn't try and come up with code myself that solves the problem because there will be some edge cases that you just won't catch. So looking at things that people way smarter than me have done I would recommend one of the following.
If those won't meet your needs then perhaps using a library like moment.js which allows for all kinds of date related manipulations. We have used moment.js and like it, but here is a list of other date manipulation libraries.