diff --git a/Sources/App/Controllers/StatsController.swift b/Sources/App/Controllers/StatsController.swift index 34562a7..c11e503 100644 --- a/Sources/App/Controllers/StatsController.swift +++ b/Sources/App/Controllers/StatsController.swift @@ -364,6 +364,7 @@ struct StatsController: RouteCollection { let calendar = Calendar.current var components = DateComponents() + components.timeZone = TimeZone(identifier: "America/New_York")! components.day = 20 components.month = 03 components.year = 2020 @@ -375,13 +376,13 @@ struct StatsController: RouteCollection { private func createDate(day:Int, month:Int, year:Int) -> Date { let calendar = Calendar.current + var components = DateComponents() components.day = day components.month = month components.year = year - components.hour = 0 - components.minute = 0 + return calendar.date(from: components)! }