Struct UtcTimeOfDay
Represents a time of day in UTC, as a TimeOnly wrapper with semantic meaning for use in day-time timers and scheduling.
public readonly struct UtcTimeOfDay : IEquatable<UtcTimeOfDay>
- Implements
Remarks
This type distinguishes UTC time-of-day from LocalTimeOfDay so that day-time timer registration APIs can require the correct interpretation without ambiguity.
Only supported in .NET 8+. Not supported in NetStandard 2.0.
Constructors
- UtcTimeOfDay(TimeOnly)
Initializes a new instance of the UtcTimeOfDay struct from a TimeOnly value.
Properties
Methods
- ToLongTimeString()
Converts the value of the current UtcTimeOfDay instance to its equivalent long time string representation.
- ToShortTimeString()
Converts the value of the current UtcTimeOfDay instance to its equivalent short time string representation.
- ToString()
Converts the value of the current UtcTimeOfDay instance to its equivalent short time string representation using the formatting conventions of the current culture.
- ToString(IFormatProvider?)
Converts the value of the current UtcTimeOfDay instance to its equivalent string representation using the specified culture-specific format information.
- ToString(string?)
Converts the value of the current UtcTimeOfDay instance to its equivalent string representation using the specified format and the formatting conventions of the current culture.
- ToString(string?, IFormatProvider?)
Converts the value of the current UtcTimeOfDay instance to its equivalent string representation using the specified format and culture-specific format information.
Operators
- operator ==(UtcTimeOfDay, UtcTimeOfDay)
Returns a value indicating whether two UtcTimeOfDay instances are equal.
- operator !=(UtcTimeOfDay, UtcTimeOfDay)
Returns a value indicating whether two UtcTimeOfDay instances are not equal.