Skip to content

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

@Sweeper777

Description

@Sweeper777

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions