Previous section   Next section

Recipe 14.4 Adjusting for Daylight Saving Time

14.4.1 Problem

You want the router to automatically adjust to Daylight Saving Time.

14.4.2 Solution

Some areas, such as most of North America and Europe, have consistent and common rules for when to switch between winter or Standard time and summer or Daylight Saving Time. The North American rule, for those areas that observe Daylight Saving Time, is to move an hour ahead at 2:00 A.M. on the first Sunday in April, and back an hour at 2:00 A.M. on the last Sunday in October. This is the default for Cisco routers that have been configured for summer time:

Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#clock summer-time EDT recurring
Router(config)#end
Router#

You can also specify exact recurrence rules. You could use the following command to explicitly define the North American rules:

Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#clock summer-time EDT recurring first sun apr 02:00 last sun oct 02:00
Router(config)#end
Router#

You can modify this line to represent other standard recurrence rules. For example, in the southern hemisphere, Daylight Saving Time commences towards the end of the year to match their summer season. To define the rules for Australian Eastern Daylight Time (AEDT), you could use the following command:

Router#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#clock summer-time AEDT recurring last sun oct 02:00 last sun mar 02:00
Router(config)#end
Router#

Some areas do not have consistent daylight saving rules. In these areas, you must configure the start and end dates explicitly:

Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#clock summer-time EDT date 26 oct 2003 02:00 6 apr 2003 02:00
Router(config)#end
Router#

14.4.3 Discussion

The router will not observe Daylight Saving Time by default. The clock summer-time command allows you to automatically reset the router's clock each fall and winter so that you don't have to do so manually, which can be a daunting task in a large network.

You can see how the router plans to implement the change to summertime with the show clock detail command:

Router>show clock detail 
14:05:04.299 EST Sun Mar 10 2003
Time source is user configuration
Summer time starts 02:00:00 EST Sun Apr 6 2003
Summer time ends 02:00:00 EDT Sun Oct 26 2003
Router>

In this case, the router is set to the default North American Daylight Saving Time start and end dates.

14.4.4 See Also

Recipe 14.3


  Previous section   Next section
Top