| ARRIS Enterprises, Inc. Confidential Information |
Time ServiceThe Time Service is responsible for setting the time zone and maintaining the system time on the STB. The service does not have a TOI interface but uses information objects. If the clock of the STB drifts from the time received from the source, the service will slowly adjust the time to avoid sudden changes which may affect applications and platform services in an unexpected way. Time SourcesCurrently there are four available time sources:
Time Source ConfigurationThe time_sources parameter of kreatv-option-timeman is used to specify a prioritized list (highest priority-first) of the time configuration sources. Supported sources are: NTP, SNTP, KreaTV Timecast and DVB. Possible values are ntp, sntp, timecast and dvb.
If time_sources is unset it will default to timecast. Ntp Server SelectionNtp server sources can be configured at build time by kreatv-option-timeman's parameter ntp_server_sources, which is a prioritized list of ntp server sources. Currently four available sources are supported: configurable, tr069, dhcp and server_discovery. See kreatv-option-timeman for details. Example:
In the example, ntp servers can be configured by the application (configurable), or by the dhcp option (option ntp-servers). The application configuration has higher priority. If ntpdate is enabled by parameter ntpdate_enable=true, ntpdate will be used
to synchronize time with ntp servers. Each ntp server will be queried in the
priority order one by one until the time is synchronized. The retry logic is
controlled by The first successfully connected server will be polled using ntpdate. The
interval between subsequent polls is randomly selected from the range defined
by Time Zone ConfigurationIt is possible to configure the timezone type and default timezone in build time by adding "kreatv-option-timezone:[time zone type]=[time zone string]" in the build config file. Supported [time zone type] can be "tz_posix" or "tz_database" according to system ability. Read kreatv-option-timezone for your STB model to figure out if "tz_posix" or "tz_database" shall be used to set timezone. DHCP time zone options are supported to change the timezone by updating the DHCP config file according to different time zone types. If configured time zone type is "tz_posix", DHCP option 100 (tz_posix string) takes effect by adding "option tz_posix [timezone value]" in the DHCP config file. If configured time zone type is "tz_database", DHCP options 101 (tz_database string) takes effect by adding "option tz_database [timezone value]" in the DHCP config file. The timezone can also be changed at run-time by updating the
Time Zone String FormatThe followings are three examples:
Time zone string can be in one of three formats according to different time zone type.
The first two formats are used to describe the time zone information directly. The POSIX.1 standard only specifies the details of the first two formats. Hence they should be used with time zone type: tz_posix. The first format is used when there is no DST (daylight savings time) for the country or region in question. The second format is used when a country or region has DST in place. The format for each part of a time zone string is as follows:
The last format is the most common format with the GNU C Library. It specifies a selection from a large database of time zone information for many regions of the world. It should be used with time zone type: tz_database. The database is maintained by a community of volunteers and put in the public domain.
Time Zone String ExamplesExamples best describe the formats. EST+5. Eastern Time Zone, five hours behind UTC time. WST-10. Western Time Zone, ten hours ahead of UTC. EST+5EDT,M4.1.0/2,M10.5.0/2. Eastern Time Zone, five hours behind UTC time. The DST time is Eastern Daylight Time which is applicable from the first Sunday in April at 2 AM and ends on the last Sunday i in October at 2 AM. Asia/Hong_Kong. Time Zone that Hong Kong uses, same as UTC+8 Time Service BehaviorThe Time Service is alone responsible for the entire time keeping. No application or other platform service should change the clock by calling system time functions. The Time Service handles the following information objects.
|