With mobile apps, incorporating the time and date in keys, signatures, and/or hashes is a common way to validate data sent between your app and your backend. To do that properly, consistency between clients and users is crucial. If you’re not careful when using dates in Swift, you’ll probably run into some lesser-known pitfalls based on your users’ device settings. Let’s walk through how to reliably get the date or time you are expecting, in a specific format, using the DateFormatter in Swift.