This section provides a sample of configuring DST using the create method.
Operation |
XPATH |
---|---|
Config |
/ietf-system:system/clock/ huawei-system:daylight |
Data Requirements
Item |
Data |
Description |
---|---|---|
Name of the DST time zone |
summer |
Set the name of the DST time zone to summer. |
DST start time |
01:00 |
Set the start time to 01:00. |
DST start month |
Mar |
Set the DST start month to March. |
Week of the DST start time in the DST start month |
second |
Set the week of the DST start time to the second week in the DST start month. |
Day in the week of the DST start time |
Sun |
Set the day in the week of the DST start time to Sunday. |
DST end date |
11-10 |
Set the DST end date to November 10. |
DST end time |
01:00 |
Set the DST end time to 01:00. |
DST offset |
01:00 |
Set the DST offset to 1 hour. |
DST start year |
2008 |
Set the DST start year to 2008. |
DST end year |
2088 |
Set the DST end year to 2088. |
Request Example
<?xml version="1.0" encoding="utf-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id=""> <edit-config> <target> <running/> </target> <config xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> <sys:system xmlns:sys="urn:ietf:params:xml:ns:yang:ietf-system"> <sys:clock nc:operation="merge"> <hw-system:daylight xmlns:hw-system="urn:huawei:params:xml:ns:yang:huawei-system"> <hw-system:daylight-name>summer</hw-system:daylight-name> <hw-system:start-time> <hw-system:hour>01:00</hw-system:hour> <hw-system:week-start>second</hw-system:week-start> <hw-system:day-start>Sun</hw-system:day-start> <hw-system:month-start>Mar</hw-system:month-start> </hw-system:start-time> <hw-system:end-time> <hw-system:hour>01:00</hw-system:hour> <hw-system:month>11-10</hw-system:month> </hw-system:end-time> <hw-system:repeating-offset>01:00</hw-system:repeating-offset> <hw-system:year-start>2008</hw-system:year-start> <hw-system:year-end>2088</hw-system:year-end> </hw-system:daylight> </sys:clock> </sys:system> </config> </edit-config> </rpc>
Response Example
Sample of successful response
<?xml version="1.0" encoding="utf-8"?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="46"> <ok/> </rpc-reply>
Sample of failed response
<?xml version="1.0" encoding="utf-8"?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="25"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>week-start,day-start,month-start must be configured together.</error-message> <error-info>Error on node /ietf-system:system/clock/huawei-system:daylight</error-info> </rpc-error> </rpc-reply>