How to Turn a DateTimeOffset into a UTC DateTime with UtcDateTime in C#
offset.UtcDateTime gives you the moment a DateTimeOffset stands for as a DateTime in UTC, with its Kind set to Utc. Use it when the code you call takes a DateTime, not a DateTimeOffset.
Microsoft's reference for DateTimeOffset.UtcDateTime: Gets a DateTime value that represents the Coordinated Universal Time (UTC) date and time of the current DateTimeOffset object. A DateTimeOffset holds a date and time together with its offset from UTC, such as +01:00. A DateTime has no offset. Instead, its Kind says whether it's in UTC, in local time, or neither. UtcDateTime does two things, in the reference's words: It converts the date and time of the current DateTimeOffset object to Coordinated Universal Time (UTC). and It converts the DateTimeOffset value to a DateTime value.
Syntax
DateTime <utc> = <offset>.UtcDateTime;
| Part | What it is |
|---|---|
<offset> | A DateTimeOffset: a date and time with its offset from UTC |
.UtcDateTime | A read-only property: the same moment in UTC, as a DateTime |
DateTime <utc> | The result. Its Kind is Utc |
The Example
A console app called UtcDateTimeProperty creates two moments, each written with its own offset: a meeting at 14:45 on 3 December 2026 at +01:00, and a call at 22:10 on 2 December at -07:00. It turns both into UTC with UtcDateTime, and prints each one before and after, with the Kind of the result. The values are fixed, so the output is the same on every computer.
Prerequisites
- The .NET 10 SDK.
dotnet --versionprints a version that starts with10.0.
Step 1: Create a Console App
dotnet new console -n UtcDateTimeProperty
cd UtcDateTimeProperty
The template "Console App" was created successfully.
Processing post-creation actions...
Restoring /Users/you/source/UtcDateTimeProperty/UtcDateTimeProperty.csproj:
Determining projects to restore...
Restored /Users/you/source/UtcDateTimeProperty/UtcDateTimeProperty.csproj (in 42 ms).
Restore succeeded.
dotnet new console -n UtcDateTimeProperty creates a folder named UtcDateTimeProperty with a project file and a Program.cs, and cd moves into it. Everything this example uses is part of .NET, so there's no package to add. Open the folder in VS Code, or UtcDateTimeProperty.csproj in Visual Studio.
Step 2: Write the Code
Replace everything in Program.cs. First the two moments:
// Two moments, each written with its own offset from UTC.
DateTimeOffset meeting = new(2026, 12, 3, 14, 45, 0, TimeSpan.FromHours(1));
DateTimeOffset call = new(2026, 12, 2, 22, 10, 0, TimeSpan.FromHours(-7));
The first six numbers are the year, month, day, hour, minute and second. The last argument is the offset: TimeSpan.FromHours(1) is one hour ahead of UTC, and TimeSpan.FromHours(-7) seven hours behind.
Then turn them into UTC:
// UtcDateTime gives the same moment as a DateTime in UTC.
DateTime meetingUtc = meeting.UtcDateTime;
DateTime callUtc = call.UtcDateTime;
meeting.UtcDateTime returns a DateTime that holds the same moment in UTC, and so does call.UtcDateTime.
Last, print them:
CultureInfo invariant = CultureInfo.InvariantCulture;
Console.WriteLine($"Meeting: {meeting.ToString("O", invariant)}");
Console.WriteLine($"UtcDateTime: {meetingUtc.ToString("O", invariant)}, Kind {meetingUtc.Kind}");
Console.WriteLine($"Call: {call.ToString("O", invariant)}");
Console.WriteLine($"UtcDateTime: {callUtc.ToString("O", invariant)}, Kind {callUtc.Kind}");
ToString("O", invariant) prints the full date and time in a fixed format: a DateTimeOffset ends with its offset, and a UTC DateTime ends with Z. Kind shows which kind of DateTime each result is. CultureInfo comes from the System.Globalization namespace, hence the using line at the top.
Step 3: Run It
Run it in VS Code's terminal, or press Ctrl+F5 in Visual Studio:
dotnet run
Meeting: 2026-12-03T14:45:00.0000000+01:00
UtcDateTime: 2026-12-03T13:45:00.0000000Z, Kind Utc
Call: 2026-12-02T22:10:00.0000000-07:00
UtcDateTime: 2026-12-03T05:10:00.0000000Z, Kind Utc

The meeting at 14:45 at +01:00 became 13:45 in UTC, one hour earlier. The call at 22:10 on 2 December at -07:00 became 05:10 on 3 December: seven hours later, on the next day. Both results end with Z and have Kind Utc. The reference explains the arithmetic: The conversion is performed by subtracting the value of the Offset property from the date and time of the current DateTimeOffset object. Subtracting an offset of -7 hours adds 7 hours.
The Complete File

using System.Globalization;
// Two moments, each written with its own offset from UTC.
DateTimeOffset meeting = new(2026, 12, 3, 14, 45, 0, TimeSpan.FromHours(1));
DateTimeOffset call = new(2026, 12, 2, 22, 10, 0, TimeSpan.FromHours(-7));
// UtcDateTime gives the same moment as a DateTime in UTC.
DateTime meetingUtc = meeting.UtcDateTime;
DateTime callUtc = call.UtcDateTime;
CultureInfo invariant = CultureInfo.InvariantCulture;
Console.WriteLine($"Meeting: {meeting.ToString("O", invariant)}");
Console.WriteLine($"UtcDateTime: {meetingUtc.ToString("O", invariant)}, Kind {meetingUtc.Kind}");
Console.WriteLine($"Call: {call.ToString("O", invariant)}");
Console.WriteLine($"UtcDateTime: {callUtc.ToString("O", invariant)}, Kind {callUtc.Kind}");
Common Mistakes
| Mistake | What happens | Do this instead |
|---|---|---|
Assigning a DateTimeOffset to a DateTime | DateTime when = meeting; didn't build: error CS0029: Cannot implicitly convert type 'System.DateTimeOffset' to 'System.DateTime' | Read the property: DateTime when = meeting.UtcDateTime; |
Reading .DateTime to get UTC | meeting.DateTime kept the clock time, 14:45, with Kind Unspecified. The offset was dropped, not applied | Use UtcDateTime, which gave 13:45 with Kind Utc |
Reading .ToUniversalTime().DateTime | It gave the right time, 13:45, but with Kind Unspecified. The reference: Retrieving the value of the UtcDateTime property is equivalent to calling the current DateTimeOffset object's ToUniversalTime.DateTime property, except that the Kind property of the latter DateTime value is DateTimeKind.Unspecified. | Use UtcDateTime, which gives the same time with Kind Utc |
FAQ
How do I turn the UTC DateTime back into a DateTimeOffset?
Pass it to the DateTimeOffset constructor:
using System.Globalization;
DateTimeOffset meeting = new(2026, 12, 3, 14, 45, 0, TimeSpan.FromHours(1));
DateTime meetingUtc = meeting.UtcDateTime;
// Turn the UTC DateTime back into a DateTimeOffset.
DateTimeOffset back = new(meetingUtc);
Console.WriteLine($"Back again: {back.ToString("O", CultureInfo.InvariantCulture)}");
Console.WriteLine($"Same moment: {back == meeting}");
Back again: 2026-12-03T13:45:00.0000000+00:00
Same moment: True
Because its Kind is Utc, the new value got an offset of +00:00. The constructor's reference: If the value of DateTime.Kind is DateTimeKind.Utc, the DateTime property of the new instance is set equal to dateTime, and the Offset property is set equal to Zero. It's written differently from the original 14:45 at +01:00, but == printed True: it's the same moment.
Does it work on the current time?
Yes. DateTimeOffset.UtcNow.UtcDateTime gives the current moment as a UTC DateTime. This program prints only its Kind, not the time:
DateTime now = DateTimeOffset.UtcNow.UtcDateTime;
Console.WriteLine($"Kind: {now.Kind}");
Kind: Utc
Conclusion
UtcDateTime turns a DateTimeOffset into a DateTime in UTC: it subtracts the offset and sets Kind to Utc. Use it rather than .DateTime, which drops the offset, or .ToUniversalTime().DateTime, which loses the Kind. To go back, pass the UTC DateTime to the DateTimeOffset constructor.
Additional Resources
DateTimeOffset.UtcDateTimeProperty — the property and how it converts.DateTimeOffsetConstructors — aDateTimeOffsetfrom its parts, or from aDateTime.DateTime.KindProperty — whatUtc,LocalandUnspecifiedmean.- Choose between DateTime, DateOnly, DateTimeOffset, TimeSpan, TimeOnly, and TimeZoneInfo — when to use which date and time type.
