Setting the switch date and time

The SAN96B-5 maintains the current date and time inside a battery-backed real-time clock (RTC) circuit. The date and time settings are used for logging events. Switch operation does not depend on the date and time; a switch with an incorrect date and time value still functions properly. However, because the date and time are used for logging, error detection, and troubleshooting, you should set them correctly.

Complete the following steps to set the date and time of the switch.

Time zones

You can set the time zone for the switch by name. You can also set country, city, or time zone parameters.

If the time zone is not set with the named options, the switch retains the offset time zone settings. The tsTimeZone command includes an option to revert to the prior time zone format. For more information about the --old option, refer to the Fabric OS Command Reference.

You can set the time zone for a switch using the tsTimeZone command. The tsTimeZone command allows you to perform the following tasks:
  • Display all of the time zones supported in the firmware
  • Set the time zone based on a country and city combination or based on a time zone ID such as PST
The time zone setting has the following characteristics:
  • You can view the time zone settings. However, only individuals with administrative permissions can set the time zones.
  • The tsTimeZone setting automatically adjusts for Daylight Savings Time.
  • Changing the time zone on a switch updates the local time zone setup and is reflected in local time calculations.
  • By default, all switches are in the Greenwich Mean Time (GMT) time zone (0,0). If all switches in a fabric are in one time zone, it is possible for you to keep the time zone setup at the default setting.
  • System services that have already started will reflect the time zone changes only after the next reboot.
  • Time zone settings persist across failover for high availability.

Local time synchronization

You can synchronize the local time of the principal or primary Fabric Configuration Server (FCS) switch to a maximum of eight external Network Time Protocol (NTP) servers. To keep the time in your SAN current, it is recommended that the principal or primary FCS switch has its time synchronized with at least one external NTP server. The other switches in the fabric will automatically take their time from the principal or primary FCS switch.

All switches in the fabric maintain the current clock server value in nonvolatile memory. By default, this value is the local clock server of the principal or primary FCS switch. Changes to the clock server value on the principal or primary FCS switch are propagated to all switches in the fabric.

When a new switch enters the fabric, the time server daemon of the principal or primary FCS switch sends out the addresses of all existing clock servers and the time to the new switch. If a switch with Fabric OS 5.3.0 or later has entered the fabric, it will be able to store the list and the active servers; pre-Fabric OS 5.3.0 switches will ignore the new list parameter in the payload and will update only the active server address.

If the active NTP server configured is IPv6, then distributing the same information in the fabric will not be possible to switches earlier than Fabric OS 5.3.0 because IPv6 is supported for Fabric OS 5.3.0 and later. The default value LOCL will be distributed to pre-Fabric OS 5.3.0 switches.

The tsClockServer command accepts multiple server addresses in IPv4, IPv6, or DNS name formats. When multiple NTP server addresses are passed,tsClockServer sets the first obtainable address as the active NTP server. The rest are stored as backup servers that can take over if the active NTP server fails. The principal or primary FCS switch synchronizes its time with the NTP server every 64 seconds.

Setting the date and time

Complete the following steps to set the date and time.
  1. Log in to the switch using the default password, which is password.
  2. Enter the date command, using the following syntax (the double quotation marks are required).
    date "mmddHHMMyy"
    The following values are used in the date command:
    • mm is the month; valid values are 01 through 12
    • dd is the date; valid values are 01 through 31
    • HH is the hour; valid values are 00 through 23
    • MM is minutes; valid values are 00 through 59
    • yy is the year; valid values are 00 through 99 (values greater than 69 are interpreted as 1970 through 1999, and values less than 70 are interpreted as 2000 through 2069). Refer to the following example to first display the date and time and then to change them.
      switch:admin> date
      Fri Aug 26 12:29:46 UTC 2011
      switch:admin> date "0208123013"
      Fri Feb 08 12:30:00 UTC 2013
      switch:admin>

Setting the time zone

You must perform the procedure on all switches for which the time zone must be set. However, you only need to set the time zone once on each switch, because the value is written to nonvolatile memory. Use one of the two following procedures to set the time zone. The first procedure requires you to select the actual time zone and the second requires you to select the country location of the switch.

The following procedure describes how to set the current time zone using timezonename mode. Make appropriate modifications for your particular time zone.

  1. Log into the switch using the default password, which is password.
  2. Enter the tsTimeZone command as follows. Use timezonename to set the time zone by time zone ID, such as PST or Country/City. The following example shows how to change the time zone from US/Pacific to US/Central. The tsTimeZone command by itself displays the current time zone.
    switch:admin> tstimezone
    Time Zone : US/Pacific
    switch:admin> tstimezone US/Central
    switch:admin> tstimezone
    Time Zone : US/Central
The following procedure describes how to set the current time zone to Pacific Standard Time using interactive mode.
  1. Enter the tsTimeZone command as follows:
    switch:admin> tstimezone --interactive
  2. You are prompted to select a general location from the list displayed.
    Please identify a location so that time zone rules can be set correctly.
  3. Enter the appropriate number from the list or Ctrl+D to quit.
  4. At the prompt, select a country location from the list displayed.
  5. At the prompt, enter the appropriate number to specify the time zone region from the list displayed or Ctrl+D to quit.

Synchronizing local time using NTP

Complete the following steps to synchronize the local time using NTP.

  1. Log in to the switch using the default password (the default password is password).
  2. Enter the tsClockServer "ntp1;ntp2" command where ntp1 is the IP address or DNS name of the first NTP server, which the switch must be able to access. The ntp2 value is the name of the second NTP server and is optional. The entire operand "<ntp1;ntp2 >" is optional; by default, this value is LOCL, which uses the local clock of the principal or primary switch as the clock server.
    switch:admin> tsClockServer "132.163.135.131"
    switch:admin> tsclockserver
    132.163.135.131
    switch:admin>
    The following example shows how to set up more than one NTP server using a DNS name:
    switch:admin> tsclockserver "10.32.170.1;10.32.170.2;ntp.localdomain.net"
    Updating Clock Server configuration...done.
    Updated with the NTP servers
    
    Changes to the clock server value on the principal or primary FCS switch are
    propagated to all switches in the fabric