Skip to content

Commit

Permalink
Fixed bug related to 24-hour time
Browse files Browse the repository at this point in the history
  • Loading branch information
whoiswillma committed Dec 11, 2018
1 parent fddbfe4 commit 248299c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Eatery/Network/NetworkManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ struct NetworkManager {
paymentTypes.append(.Swipes)
}


var diningItems: [String: [MenuItem]] = [:]
var eventItems: [String : [String : Event]] = [:]

Expand All @@ -65,6 +64,7 @@ struct NetworkManager {

let timeDateFormatter = DateFormatter()
timeDateFormatter.dateFormat = "YYYY-MM-dd:h:mma"
timeDateFormatter.locale = Locale(identifier: "en_US_POSIX")
eatery.operatingHours.compactMap { $0 }.forEach { operatingHour in
let dateString = operatingHour.date
let date = dateFormatter.date(from: dateString) ?? Date()
Expand Down

0 comments on commit 248299c

Please sign in to comment.