in swift is a date always in GMT/UTC
Asked on 2025-08-06
1 search
In Swift, a Date
object does not inherently store time zone information. It represents a specific point in time, independent of any time zone. When you create a Date
object, it is essentially a timestamp that is based on the number of seconds since the reference date, which is January 1, 2001, at 00:00:00 UTC (GMT).
When you display or format a Date
object, you can choose to represent it in any time zone using a DateFormatter
. By default, if you do not specify a time zone, the system's current time zone is used for formatting. However, the underlying Date
value remains the same, as it is always in UTC.
For more detailed information on date and time handling in Swift, you might want to check out the session on Swift libraries, such as Foundation, which includes APIs for date and time formatting. You can find this in the What’s new in Swift session.

What’s new in Swift
Join us for an update on Swift. We’ll briefly go through a history of Swift over the past decade, and show you how the community has grown through workgroups, expanded the package ecosystem, and increased platform support. We’ll introduce you to a new language mode that achieves data-race safety by default, and a language subset that lets you run Swift on highly constrained systems. We’ll also explore some language updates including noncopyable types, typed throws, and improved C++ interoperability.

Embracing Swift concurrency
Join us to learn the core Swift concurrency concepts. Concurrency helps you improve app responsiveness and performance, and Swift is designed to make asynchronous and concurrent code easier to write correctly. We’ll cover the steps you need to take an app through from single-threaded to concurrent. We’ll also help you determine how and when to make the best use of Swift concurrency features – whether it’s making your code more asynchronous, moving it to the background, or sharing data across concurrent tasks.

What’s new in Swift
Join us for an update on Swift. We’ll talk about workflow improvements that make you more productive, and new and modernized library APIs for fundamental programming tasks. We’ll show examples of Swift adoption throughout more layers of the software stack. Finally, we’ll explore new language features for both improving approachability of concurrency, and achieving peak performance when you need it.