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

Commit

Permalink
fixed time zone bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tgymnich committed Jan 11, 2021
1 parent b6f3013 commit 4e51c99
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions TUM Campus App/Calendar/CalendarWeekViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ final class CalendarWeekViewController: DayViewController, ProfileImageSettable
fetch(animated: animated)
}

// override func loadView() {
// calendar.timeZone = TimeZone(identifier: "Europe/Paris")!
// dayView = DayView(calendar: calendar)
// view = dayView
// }

private func setupUI() {
title = "Calendar".localized
edgesForExtendedLayout = UIRectEdge.all
Expand Down
2 changes: 2 additions & 0 deletions TUM Campus App/Extensions/Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,14 @@ extension DateFormatter {
/// yyyy-MM-dd HH:mm:ss
static let yyyyMMddhhmmss: DateFormatter = {
let formatter = DateFormatter()
formatter.timeZone = TimeZone(identifier: "Europe/Berlin")!
formatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
return formatter
}()
/// "yyyy-MM-dd"
static let yyyyMMdd: DateFormatter = {
let formatter = DateFormatter()
formatter.timeZone = TimeZone(identifier: "Europe/Berlin")!
formatter.dateFormat = "yyyy-MM-dd"
return formatter
}()
Expand Down

0 comments on commit 4e51c99

Please sign in to comment.