Calendar Page BirthDate Convert Wrong! - نوشته شده در (1871 Views)
Average Member
sadra
مطلب: 354
Hi... Calendar Page BirthDate Convert Wrong! please see the screenshot
 پیش‌فرض مرتب‌سازی برای تاریخ DESC به معنی جدیدترین است  
 تعداد در صفحه 
نوشته شده در
Average Member
sadra
مطلب: 354
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
نوشته شده در
Forum Administrator
HuwR
مطلب: 4661
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
نوشته شده در
Forum Administrator
HuwR
مطلب: 4661
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.
نوشته شده در
Forum Administrator
HuwR
مطلب: 4661
I'll take a look, but may not be much I can do since date conversion is done by the system not me.