shoheiyokoyama / Koyomi

Simple customizable calendar component in Swift :calendar:
MIT License
749 stars 103 forks source link

Brazilian SUMMERTIME bug. #41

Open loverde-co opened 6 years ago

loverde-co commented 6 years ago

Hi there, is there a way to fix your method formated() and other places that you save Date to fix the SUMERTIME cases ? Cause, October 15 change from 00:00:00 to 14 23:00:00. Could it be fix to not consider hour on your calendar ? Thanks

whoislyuboanyway commented 6 years ago

Wait for this pull request to be merged and try again :)

48

loverde-co commented 6 years ago

Thanks!

loverde-co commented 5 years ago

This merged couldn't help, still getting summer time wrong date yet. And another thing happened. On iOS 11.x this bug occur on your re-formating function here:

func formated(withFormat format: String = "yyyy/MM/dd") -> Date? {
        let formatter: DateFormatter = .init()
        formatter.dateFormat = format
        let dateString = formatter.string(from: self)
        return formatter.date(from: dateString)
    }

Always when you use this code, date back to yesterday. Every time.