Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you pass consistent dates to the date parameters in the delegate methods? #386

Closed
Sweeper777 opened this issue Aug 17, 2016 · 2 comments
Labels

Comments

@Sweeper777
Copy link

So I basically added a calendar view and added those required data source methods, plus the didSelectDate delegate method. Here is my (simplified) didSelectDate method:

func calendar(calendar: FSCalendar, didSelectDate date: NSDate) {
    print(date)
}

When I was in Hong Kong (UTC+8), the method always printed yyyy-mm-dd 16:00:00 +0000
Now I traveled to the UK (UTC+1), the method now prints yyyy-mm-dd 23:00:00 +0000

Why is the time component different in different time zones? I mean, the user is selecting a date, the time component should be a constant regardless of the time zone!

Can you change all the time components to 00:00:00? This makes it easier to access dictionaries and stuff with the date parameter.

@Sweeper777
Copy link
Author

I just discovered that this issue is appearing again in version 2.7.7! I am now in the UK (UTC+1) and it's giving me yyyy-mm-dd 23:00:00 +0000 as dates again!

@shadyk
Copy link

shadyk commented Dec 17, 2018

I am getting the same result in numberOfEventsFor date:
I think it is associated with the time zone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants