Skip to content
This repository was archived by the owner on Jun 23, 2019. It is now read-only.

Commit cb9719f

Browse files
committed
Make calendar to use UTC timezone instead of the user's current one.
1 parent 3dee761 commit cb9719f

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

Koyomi/DateModel.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,11 @@ final class DateModel: NSObject {
307307
// MARK: - Private Methods -
308308

309309
private extension DateModel {
310-
var calendar: Calendar { return Calendar.current }
310+
var calendar: Calendar {
311+
var utcCalendar = Calendar.current
312+
utcCalendar.timeZone = TimeZone(abbreviation: "UTC")!
313+
return utcCalendar
314+
}
311315

312316
func setup() {
313317
selectedDates = [:]

0 commit comments

Comments
 (0)