Calendar Page BirthDate Convert Wrong! - Posted (815 Views)
Average Member
/mvc/ProtectedContent/Avatar/sadra132338283059455318.jpg
Posts: 350
starstarstar
Hi...
Calendar Page BirthDate Convert Wrong!
please see the screenshot
 Sort direction, for dates DESC means newest first    Page size 
Posted
Average Member
/mvc/ProtectedContent/Avatar/sadra132338283059455318.jpg
Posts: 350
starstarstar
Ok, I now see the issue. your DOB is stored in the database in gregorian as 19780711 which as you say is 1357/04/20 however the problem arises because 11th July 2020 is indeed the 21/04/1399 in your calendar rather than 20/04/1399

Next year it will be on the correct day, it is something to do with leap years I think possiblyنوشته شده توسط HuwR


Ok.. you are right...
tanx
Posted
Forum Administrator
/mvc/ProtectedContent/Avatar/HuwR132430879466080654.jpg
Posts: 4393
starstarstarstarstar
Ok, I now see the issue. your DOB is stored in the database in gregorian as 19780711 which as you say is 1357/04/20 however the problem arises because 11th July 2020 is indeed the 21/04/1399 in your calendar rather than 20/04/1399

Next year it will be on the correct day, it is something to do with leap years I think possibly
Posted
Forum Administrator
/mvc/ProtectedContent/Avatar/HuwR132430879466080654.jpg
Posts: 4393
starstarstarstarstar
Actually thinking about this it may just be a UTC time issue since it is in July. When storing the date of birth it does not have a time in the database so it sets the time to 00:00 when converting DOB, tis is probably where it is going wrong and the date is slipping.

I will adjust the code so that rather than using 00:00 for the time part it uses midday instead, this should then negate and UTC conversion problems.
Posted
Forum Administrator
/mvc/ProtectedContent/Avatar/HuwR132430879466080654.jpg
Posts: 4393
starstarstarstarstar
I'll take a look, but may not be much I can do since date conversion is done by the system not me.
 
You Must enter a message