I have a Razor project and everything was working fine until I decided to upgrade the server from 2016 to 2022 , After upgrading I noticed that .Net accept Hijri date as Gregorian date, for example I have form contain date input filed and If send Hijri date let say (1446/04/19) the .Net will treat this date as Gregorian date not Hijri date. I tried to run the project in different server but this time Windows Server 2016 and i got the expected behavior
Expected Behavior
After configure the localization I tried to print the current Date in the page using DateTime.Now.ToString("yyyy/MM/dd") and instead of printing Hirji date it print Gregorian date which is not the right or expected behavior
Steps To Reproduce
Please clone this Repo and try to run the app in Windows server 2016 and 2022 to see the difference
Is there an existing issue for this?
Describe the bug
I have a Razor project and everything was working fine until I decided to upgrade the server from 2016 to 2022 , After upgrading I noticed that .Net accept Hijri date as Gregorian date, for example I have form contain date input filed and If send Hijri date let say (1446/04/19) the .Net will treat this date as Gregorian date not Hijri date. I tried to run the project in different server but this time Windows Server 2016 and i got the expected behavior
Expected Behavior
After configure the localization I tried to print the current Date in the page using DateTime.Now.ToString("yyyy/MM/dd") and instead of printing Hirji date it print Gregorian date which is not the right or expected behavior
Steps To Reproduce
Please clone this Repo and try to run the app in Windows server 2016 and 2022 to see the difference
Image from windows server 2022
Image from windows server 2016
Exceptions (if any)
No response
.NET Version
+6
Anything else?
No response