DateTimeOffset 構造体 (System 名前空間)
public struct DateTimeOffset : IComparable, IComparable<DateTimeOffset>, IEquatable<DateTimeOffset>, ISpanFormattable, IDeserializationCallback, ISerializable
継承:Object → ValueType → DateTimeOffset
- 世界協定時刻(UTC)からの時差を含む日付・時刻を表します。
コンストラクタ
DateTimeOffset
public DateTimeOffset (DateTime dateTime);
public DateTimeOffset (DateTime dateTime, TimeSpan offset);
public DateTimeOffset (long ticks, TimeSpan offset);
public DateTimeOffset (int year, int month, int day, int hour, int minute, int second, TimeSpan offset);
public DateTimeOffset (int year, int month, int day, int hour, int minute, int second, int millisecond, TimeSpan offset);
public DateTimeOffset (int year, int month, int day, int hour, int minute, int second, int millisecond, System.Globalization.Calendar calendar, TimeSpan offset);
プロパティ
Now
public static DateTimeOffset Now { get; }
Offset
public TimeSpan Offset { get; }
UtcNow
public static DateTimeOffset UtcNow { get; }
メソッド
Add
public DateTimeOffset Add (TimeSpan timeSpan);