skip to Main Content

Why Xcode & Simulator give me different dates?

I have this simple code (Xcode iOS app) import SwiftUI struct ContentView: View { var body: some View { VStack { Button(action: { let dateToday = Date() let dateOneYearAgo = Calendar.current.date(byAdding: .year, value: -1, to: dateToday) ?? dateToday print("dateToday: (dateToday)…

VIEW QUESTION
Back To Top
Search