Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public struct HomeReducer {
public var pendingDeletePhotologID: Int64?
public var hasCards: Bool { !items.isEmpty }
public var isEmptyVisible: Bool { !isLoading && items.isEmpty }
public let nowDate = CalendarNow()
public var nowDate: CalendarNow { CalendarNow() }
public var toast: TXToastType?
public var modal: TXModalStyle?
public var isProofPhotoPresented: Bool = false
Expand Down
6 changes: 5 additions & 1 deletion Projects/Shared/Util/Sources/CalendarNow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ public struct CalendarNow: Equatable, Hashable {

public init(
date: Date = Date(),
calendar: Calendar = Calendar(identifier: .gregorian)
calendar: Calendar = {
var c = Calendar(identifier: .gregorian)
c.timeZone = .current
return c
}()
) {
self.year = calendar.component(.year, from: date)
self.month = calendar.component(.month, from: date)
Expand Down
Loading