You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using HorizonCalendar that allows the user to select a date and enter some data based on the selected date. I am parsing the Day object to date like this:
sharedDataStore.gregorianCalendar's implementation is: gregorianCalendar = Calendar(from: .gregorian)
Now for example, today's date is June 8, 2023 but when I am tapping June 7th, 2023, the parsedDate value is 2023-06-06 16:00:00 +0000
Any idea what's happening? I am currently on a country where the timezone is GMT +8, I don't know if it will help to diagnose my problem.
Also note, I am using a single instance of the calendar sharedDataStore.gregorianCalendar as I believe you mentioned that somewhere in the issues to only use one calendar.
Thanks!
The text was updated successfully, but these errors were encountered:
@jl-mobitech you might want to use Calendar.current. Just creating a calendar via Calendar(identifier: .gregorian) might not have it configured with the right info.
I am using HorizonCalendar that allows the user to select a date and enter some data based on the selected date. I am parsing the
Day
object to date like this:sharedDataStore.gregorianCalendar's implementation is:
gregorianCalendar = Calendar(from: .gregorian)
Now for example, today's date is June 8, 2023 but when I am tapping June 7th, 2023, the
parsedDate
value is2023-06-06 16:00:00 +0000
Any idea what's happening? I am currently on a country where the timezone is GMT +8, I don't know if it will help to diagnose my problem.
Also note, I am using a single instance of the calendar
sharedDataStore.gregorianCalendar
as I believe you mentioned that somewhere in the issues to only use one calendar.Thanks!
The text was updated successfully, but these errors were encountered: