Skip to content

Commit

Permalink
Fix bug in computing recurrences in time zones < GMT
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Schoenig committed Sep 18, 2017
1 parent 6e4187b commit 03d114d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Classes/core/CustomEvent/SGCustomEventRecurrenceRule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ extension SGCustomEventRecurrenceRule {
assert(startTime >= 0)
assert(duration >= 0)

let gregorian = Calendar(identifier: .gregorian)
var gregorian = Calendar(identifier: .gregorian)
gregorian.timeZone = timeZone

var components = gregorian.dateComponents(in: timeZone, from: earliest)
components.hour = 0
components.minute = 0
Expand Down

0 comments on commit 03d114d

Please sign in to comment.