Enabling extended DST on Cisco IOS
Ran into a fun little issue recently configuring a new router while taking into account the changes we’re going to see in Daylight Saving Time here in the U.S.
As of the year 2007, Daylight Saving Time in most of the U.S. and Canada starts earlier than past years due to the U.S. Energy Policy Act of 2005. DST now begins on the 2nd Sunday of March and ends on the 1st Sunday of November, both at 02:00 AM local time.
If your network equipment keeps time, and you set it to your local time (not GMT), then you may need to change this by hand — often the software powering these systems do not yet follow the new DST rules.
In order to do this automatically on most versions of Cisco IOS, you can try the following…
First, check your current time configuration – there’s no need in doing this if the version of IOS on your router obeys the new DST rules:
grps-edge-rtr-1>show clock detail
01:18:39.439 PST Fri Feb 9 2007
Time source is NTP
Summer time starts 02:00:00 PST Sun Apr 1 2007
Summer time ends 02:00:00 PDT Sun Oct 28 2007
In this case, the router is following the old DST rules, indicated by the incorrect dates. We will need to update this for this version of IOS.
Let’s update the DST settings. This should be pretty painless:
grps-edge-rtr-1>en
Password:
grps-edge-rtr-1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
grps-edge-rtr-1(config)#clock timezone PST -8
grps-edge-rtr-1(config)#clock summer-time PDT recurring 2 Sun Mar 2:00 1 Sun Nov 2:00
grps-edge-rtr-1(config)#end
This set of commands first applies the standard timezone with the label “PST” as -8 hours offset from UTC. Then we state that the summer-time zone we label as “PDT” starts on the 2nd Sunday in March at 2:00am, and ends on the 1st Sunday in November. Obviously, change the timezone labels and UTC offsets to suit your needs.
You then should confirm the new settings with the following command:
grps-edge-rtr-1#show clock detail
01:19:53.644 PST Fri Feb 9 2007
Time source is NTP
Summer time starts 02:00:00 PST Sun Mar 11 2007
Summer time ends 02:00:00 PDT Sun Nov 4 2007
I’ve tested this on a handful of IOS versions, including from 12.1 through 12.4. As a note, all versions of 12.4 that I have access to already have the new DST rules set by default, however setting the summer-time rules this way won’t hurt anything.
Don’t forget to commit your changes to NVRAM!
