# Time Management

### 1. Function Overview

This product provides the functions shown below for managing the date and time.

- Manual (user-configured) date/time information setting function

- Automatic date/time setting information function via network

- Time zone setting function

- Function for setting “daylight saving time” (DST or “daylight time”) settings

### 2. Definition of Terms Used

UTC（Coordinated Universal Time）

This is an official time used when recording worldwide times.
UTC is used as a basis to determine standard time in all countries around the world.
For instance, Japan (JST, or Japan standard time) is nine hours ahead of Coordinated Universal Time, and is thus shown as “+0900 (JST)”.

SNTP（Simple Network Time Protocol）

This is a simple protocol to correct clocks by using SNTP packets.
This protocol is defined in RFC4330.

### 3. Function Details

#### 3.1. Manually setting the date and time

Use the clock set command to directly enter clock setting values.

#### 3.2. Automatically setting the date and time

Date and time information is collected from a specified time server, and set in this product.
Defined in RFC4330, SNTP (Simple Network Time Protocol) is used as a communication protocol.
Up to two time servers can be specified using an IPv4 address, IPv6 address, or fully qualified domain name (FQDN).
Port number 123 is used for the SNTP client. (This setting cannot be changed by the user.)
The ntpdate command can be used to select one of two methods for automatically setting date and time settings.

- One-shot update (a function to update when a command is inputted)

- Interval update (a function to update in a 1–24-hour cycle from command input)

If clock settings are synchronized with two time servers specified, queries are processed in the order they are displayed by the show ntpdate command, which is NTP server 1 and then NTP server 2.
Queries to NTP server 2 are only processed if synchronization with NTP server 1 fails.
Given default settings, one hour is specified as the interval update cycle.
However, when the default time cannot be set right after booting up the system, the time server will be queried in a one-minute cycle, regardless of the interval cycle time.
Synchronization with the time server operates with one sampling (the frequency of replies from the server) and with a timeout of 1 second.
Synchronization is blocked during command execution, and an error message is outputted if a timeout occurs.

#### 3.3. Time zone setting

In order to manage the time for the region considered as the “base of daily life”, the “clock timezone” command is used to manage the time zone of the users, and reflect this into the time.
The time zone can be set in ±1 hour increments for Coordinated Universal Time (UTC), from -12 hours to +13 hours.
The default time zone value for this product is +9.0.

#### 3.4. Daylight saving time setting

Users can set “daylight saving time” (DST or “daylight time”) settings using the clock summer-time command.
The following parameter settings are specified.

- Time zone name
  The time zone name is displayed when daylight saving time is in effect.

- Start and end times of daylight saving time
  You can specify the time in one of two ways:

  - Recurring
    If daylight saving time occurs every year for the same period, then this specifies the week and day of the month it occurs.

  - Specific dates
    This specifies the specific dates daylight saving time is applied.

- Offset
  This specifies how long (minutes) to extend the daylight saving time period.
  The setting range is from 1 to 1440 minutes. The setting value is 60 minutes unless specified otherwise.

Overlapping daylight saving time periods cannot be specified.
Daylight saving time settings can be checked using the show clock detail command.

### 4. Related Commands

Related commands are indicated below.
For details, refer to the Command Reference.

Operations | Operating commands
--- | ---
Set clock manually | clock set
Time zone setting | clock timezone
Set daylight saving time settings (recurring) | clock summer-time recurring
Set daylight saving time settings (specific date) | clock summer-time date
Show current time | show clock
Set NTP server | ntpdate server
Synchronize time from NTP server (one-shot update) | ntpdate oneshot
Synchronize time from NTP server (update interval) | ntpdate interval
Show NTP server time synchronization settings | show ntpdate

### 5. Examples of Command Execution

#### 5.1. Set clock manually

In this example, the time zone is set to JST and the current time is set to 2014.01.21 15:50:59.

    Yamaha#configure terminal
    Yamaha(config)#clock timezone JST (1)
    Yamaha(config)#exit
    Yamaha#clock set 15:50:59 Jan 21 2014 (2)
    Yamaha#show clock (3)
    15:50:59 JST Tue Jan 21 2014

1 | Time zone setting
2 | Time settings
3 | Show current time

#### 5.2. Automatically setting the time

In this example, the time zone is set to +9.00 and the local address 192.168.1.1 and ntp.nict.jp are specified as the NTP servers.
Also, the NTP server update cycle is changed to once every 24 hours.

    Yamaha#configure terminal
    Yamaha(config)#clock timezone +9:00 (1)
    Yamaha(config)#ntpdate server ipv4 192.168.1.1 (2)
    Yamaha(config)#ntpdate server name ntp.nict.jp (3)
    Yamaha(config)#ntpdate interval 24 (4)
    Yamaha(config)#exit
    Yamaha#show clock (5)
    10:03:20 +9:00 Mon Dec 12 2016
    Yamaha#show ntpdate (6)
    NTP server 1 : 192.168.100.1
    NTP server 2 : ntp.nict.jp
    adjust time : Mon Dec 12 10:03:15 2016 + interval 24 hours
    sync server : 192.168.100.1

1 | Time zone setting
2 | Set NTP server
3 | Set NTP server
4 | Set NTP server update cycle to 24 hours
5 | Show current time
6 | Show NTP time synchronization settings

#### 5.3. Daylight saving time setting

##### 5.3.1. Recurring

In this example, daylight saving time is set to occur every year starting from 2 AM on the second Sunday of March to 2 AM on the first Sunday of November.

    Yamaha#configure terminal
    Yamaha(config)#clock summer-time JDT recurring 2 Sun Mar 2:00 1 Sun Nov 2:00 (1)
    Yamaha(config)#exit
    Yamaha#show clock detail (2)
    Fri Jan  1 00:00:20 JST 2021

    Summer Time
      Type   : Recurring
      Offset : 60 (min)
      From   : Sun Mar 14 02:00:00 JST 2021 (3)
      To     : Sun Nov 7 02:00:00 JDT 2021

1 | Daylight saving time setting
2 | Check the daylight saving time settings
3 | Show the actual dates of the next (or currently in effect) daylight saving time period

##### 5.3.2. Specific dates

In this example, the settings specify starting daylight saving time at 2 AM on March 14, 2021, and ending it on November 7, 2021.

    Yamaha#configure terminal
    Yamaha(config)#clock summer-time JDT date Mar 14 2021 2:00 Nov 7 2021 2:00 (1)
    Yamaha(config)#exit
    Yamaha#show clock detail (2)
    Fri Jan  1 00:02:54 JST 2021

    Summer Time
      Type   : Date
      Offset : 60 (min)
      From   : Sun Mar 14 02:00:00 JST 2021
      To     : Sun Nov 7 02:00:00 JDT 2021

1 | Daylight saving time setting
2 | Check the daylight saving time settings

### 6. Points of Caution

None

### 7. Related Documentation

- RFC 4330: Simple Network Time Protocol (SNTP) Version 4 for IPv4, IPv6 and OSI

Search result
No more search results.
There are no topics that match your search query.