WenchaoD / FSCalendar

A fully customizable iOS calendar library, compatible with Objective-C and Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I get an error where today is the day before.

rose6649 opened this issue · comments

The following informations are requested in a bug report

  • A brief bug description : Even with my locale change, I get an error where today is the day before. (Locale is ko_KR)
  • Stack trace :
  • Integration method.(manually/cocoapods/carthage) : cocoapods
  • Full steps to reproduce. : In viewwillappear() life cycle, I called calendar.reloaddata() every time. Nevertheless, after 12:00 p.m., today does not change. Today is changed until I completely close the app and turn it on again. In this process, I am not sure if the today phenomenon is an error or if only the date in the reloadData is not changed.
  • Device modal and iOS version. e.g. iPhone 6s iOS9.1 : iPhone XR iOS14.4
  • Xcode version. e.g. Xcode 8.1 : Xcode 14.3
  • FSCalendar version. e.g. FSCalenda 2.5.1 : lastest FSCalendar version
  • Does this happen in the demo project? Which one? Or a link to another demo project.

I solved this bug by putting the code in the library.
The _today value in the function of the reloaddata() part of the library is implemented in object-c language so that the value can be changed immediately. I also changed the locale to suit my country.

However, if anyone can work out this process in detail, I would appreciate it if you let me know.

I may have the same problem as you. I need to allow users in other countries to use Chinese time, but this library and the law of time have bothered me for a long time. TAT, I also want to add code to solve this problem, but I think this behavior may not be safe.

Same problem here!