###设置系统日期和时间
这项操作用来设置设备系统的日期和时间。该设备必须支持通过SetSystemDateAndTime命令来配置夏时令设置、手动设置时间(如果适用的话)或者指定NTP设置时间(如果适用的话)。A device shall consider a Timezone which is not formed according to the rules of [IEEE 1003.1] section 8.3 as invalid.
如果系统时间和日期是手动设置的,那么客户端请求应包含UTCDateTime或者LocalDateTime信息。
夏时令的标识应该设置为true来激活任何DST设置时区的字符串。
###表45:SetSystemDateAndTime命令
消息名 | 描述 |
---|---|
SetSystemDateAndTime-Request | 消息包含设备的时间和日期信息 “DateTimeType”: 如果系统时间是手动设置的或者NTP设置的 “DaylightSavings”: 如果在时区里面已经定义,将自动调整夏时令 "TimeZone":在第8.3节POSIX 1003.1中定义的时区 “UTCDateTime”: UTC时间和日期。如果DateTimeType是NTP,UTCDateTime就没有作用。 tt:SetDateTimeType DateTimeType [1][1] xs:boolean DayLightSavings [1][1] tt:TimeZone TimeZone [0][1] tt:DateTime UTCDateTime [0][1] |
SetSystemDateAndTime-Response | 这是一个空消息 |
错误代码 | 描述 |
env:Sender ter:InvalidArgVal ter:InvalidTimeZone |
指定了无效的时区 |
env:Sender ter:InvalidArgVal ter:InvalidDateTime |
指定了无效的日期和时间 |
env:Sender ter:InvalidArgVal ter:NtpServerUndefined |
无法把DateTimeType切换到NTP,因为NTP服务器是无效的 |