[Solved] Calculate time interval to 0.00 of the next day according to GMT in swift or objective-c?
First create a Calendar for the UTC timezone. Second get the startOfDay using the UTC calendar. Third add one day to that date. Then you can useDatemethodtimeIntervalSince(_ Date)` to calculate the amount of seconds between those two dates: extension Calendar { static let iso8601UTC: Calendar = { var calendar = Calendar(identifier: .iso8601) calendar.timeZone = TimeZone(identifier: … Read more