XmlDateTimeSerializationMode 枚举
定义
public enum class XmlDateTimeSerializationMode
public enum XmlDateTimeSerializationMode
type XmlDateTimeSerializationMode =
Public Enum XmlDateTimeSerializationMode
- 继承
字段
Local | 0 | 作为本地时间处理。Treat as local time. 如果 DateTime 对象表示协调通用时间 (UTC),它将转换为本地时间。If the DateTime object represents a Coordinated Universal Time (UTC), it is converted to the local time. |
RoundtripKind | 3 | 转换时应保留时区信息。Time zone information should be preserved when converting. |
Unspecified | 2 | 如果 DateTime 要转换为字符串,将作为本地时间处理。Treat as a local time if a DateTime is being converted to a string. 如果正在将字符串转换为 DateTime,则在指定了时区时转换为本地时间。If a string is being converted to DateTime, convert to a local time if a time zone is specified. |
Utc | 1 | 作为 UTC 处理。Treat as a UTC. 如果 DateTime 对象表示本地时间,它将转换为 UTC。If the DateTime object represents a local time, it is converted to a UTC. |
注解
此枚举由XmlConvert.ToDateTime和XmlConvert.ToString方法使用。This enumeration is used by the XmlConvert.ToDateTime and XmlConvert.ToString methods.