Server Error in '/' Application.

Specified time is not supported in this calendar. It should be between 03/22/0622 00:00:00 (Gregorian date) and 12/31/9999 23:59:59 (Gregorian date), inclusive.
Parameter name: time

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentOutOfRangeException: Specified time is not supported in this calendar. It should be between 03/22/0622 00:00:00 (Gregorian date) and 12/31/9999 23:59:59 (Gregorian date), inclusive.
Parameter name: time

Source Error:


Line 80:         string FD;
Line 81:         PersianCalendar pc = new PersianCalendar();
Line 82:         FD = pc.GetYear(DT) + "/";
Line 83:         FD += pc.GetMonth(DT) + "/";
Line 84:         FD += pc.GetDayOfMonth(DT);

Source File: d:\hostingspaces\matboatefars.ir\httpdocs\App_Code\MyClass.cs    Line: 82

Stack Trace:


[ArgumentOutOfRangeException: Specified time is not supported in this calendar. It should be between 03/22/0622 00:00:00 (Gregorian date) and 12/31/9999 23:59:59 (Gregorian date), inclusive.
Parameter name: time]
   System.Globalization.PersianCalendar.CheckTicksRange(Int64 ticks) +5010773
   System.Globalization.PersianCalendar.GetDatePart(Int64 ticks, Int32 part) +33
   System.Globalization.PersianCalendar.GetYear(DateTime time) +27
   MyClass.DateConvert(DateTime DT) in d:\hostingspaces\matboatefars.ir\httpdocs\App_Code\MyClass.cs:82
   gallery.Page_Load(Object sender, EventArgs e) in d:\hostingspaces\matboatefars.ir\httpdocs\gallery.aspx.cs:51
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4700.0