time experiment
This commit is contained in:
@@ -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
|
||||
@@ -376,12 +377,12 @@ 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)!
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user