Skip to content
This repository was archived by the owner on Jan 10, 2024. It is now read-only.

Commit 4e51c99

Browse files
committed
fixed time zone bug
1 parent b6f3013 commit 4e51c99

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

TUM Campus App/Calendar/CalendarWeekViewController.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ final class CalendarWeekViewController: DayViewController, ProfileImageSettable
3131
fetch(animated: animated)
3232
}
3333

34+
// override func loadView() {
35+
// calendar.timeZone = TimeZone(identifier: "Europe/Paris")!
36+
// dayView = DayView(calendar: calendar)
37+
// view = dayView
38+
// }
39+
3440
private func setupUI() {
3541
title = "Calendar".localized
3642
edgesForExtendedLayout = UIRectEdge.all

TUM Campus App/Extensions/Extensions.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,14 @@ extension DateFormatter {
9797
/// yyyy-MM-dd HH:mm:ss
9898
static let yyyyMMddhhmmss: DateFormatter = {
9999
let formatter = DateFormatter()
100+
formatter.timeZone = TimeZone(identifier: "Europe/Berlin")!
100101
formatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
101102
return formatter
102103
}()
103104
/// "yyyy-MM-dd"
104105
static let yyyyMMdd: DateFormatter = {
105106
let formatter = DateFormatter()
107+
formatter.timeZone = TimeZone(identifier: "Europe/Berlin")!
106108
formatter.dateFormat = "yyyy-MM-dd"
107109
return formatter
108110
}()

0 commit comments

Comments
 (0)