DateTimeKind 列舉
定義
public enum class DateTimeKind
public enum DateTimeKind
[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 | 表示的時間為本地時間。The time represented is local time. |
Unspecified | 0 | 表示的時間既未指定為本地時間,也未指定為 Coordinated Universal Time (UTC)。The time represented is not specified as either local time or Coordinated Universal Time (UTC). |
Utc | 1 | 表示的時間為 UTC。The time represented is UTC. |
備註
列舉的成員 DateTimeKind 會由 DateTime.Kind 屬性傳回。A member of the DateTimeKind enumeration is returned by the DateTime.Kind property.
列舉的成員 DateTimeKind 會用於本地時間與國際標準時間 (UTC) 之間的轉換作業,但不會在比較或算數運算中使用。The members of the DateTimeKind enumeration are used in conversion operations between local time and Coordinated Universal Time (UTC), but not in comparison or arithmetic operations. 如需時間轉換的詳細資訊,請參閱 在各時區之間轉換時間。For more information about time conversions, see Converting Times Between Time Zones.