Did you upgrade to Windows 10 recently and your MVC website now have an issue under the development phase after it? Then maybe you also experience the same issue that affected your code on IIS. That is becuase Convert.ToDateTime utilizes the machine’s Culture(It changes when you use Windows 10 even you are using the same Country set) to parse a Date time. So to use it regardless of the Culture use the code snippet below.
I have been wondering today on how to make your website created on ASP .Net perfect to all timezone so that if a user view your website on another country the date and time of your website is set to their timezone. So lets start to Timezone your DateTime!
First create a Website Project on your Visual Studio