DateTimeKind 列挙型
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
DateTime オブジェクトが表す時刻の種類 (現地時刻、世界協定時刻 (UTC)、または、そのいずれでもない) を指定します。
public enum class DateTimeKind
C#
public enum DateTimeKind
C#
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public enum DateTimeKind
type DateTimeKind =
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type DateTimeKind =
Public Enum DateTimeKind
- 継承
- 属性
名前 | 値 | 説明 |
---|---|---|
Local | 2 | 現地時刻であることを表します。 |
Unspecified | 0 | 現地時刻と世界協定時刻 (UTC) のいずれも指定されていないことを表します。 |
Utc | 1 | UTC 時刻であることを表します。 |
列挙体の DateTimeKind メンバーは、 プロパティによって DateTime.Kind 返されます。
列挙体の DateTimeKind メンバーは、ローカル時刻と協定世界時 (UTC) の間の変換操作で使用されますが、比較演算や算術演算では使用されません。 時刻変換の詳細については、「 タイム ゾーン間の時刻の変換」を参照してください。
製品 | バージョン |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7 |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 |
.NET Standard | 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.0, 2.1 |
UWP | 10.0 |