Attribute Settings

Mandatory Attributes

The mandatory attributes of the Time cluster are set as follows:

utctTime

This is a mandatory 32-bit attribute which holds the current time (UTC). On the time-master, this attribute value is incremented once per second. On all other devices, it is the responsibility of the local application to synchronise this time with the time-master. For more information on time-synchronisation, refer to Section 18.5.

u8TimeStatus

This is a mandatory 8-bit attribute containing the bitmap detailed in Table 28 onpage 389. This attribute must be set as follows on the time-master (Time cluster server):

  • The ‘Master’ bit should initially be zero until the current time has been obtained from an external time-of-day source. Once the time has been obtained and set, the ‘Master’ bit should be set (to ‘1’).

  • The ‘Synchronised’ bit must always be zero, as the time-master does not obtain its time from another device within the ZigBee network (this bit is set to ‘1’ only for a secondary Time cluster server that is synchronized to the time-master).

  • The ‘Master for Time Zone and DST’ bit must be set (to ‘1’) once the time-zone and Daylight Saving Time (DST) attributes (see below) have been correctly set for the device.

Macros are provided for setting the individual bits of the u8TimeStatus bitmap - for example, the macro CLD_TM_TIME_STATUS_MASTER_MASK is used to set the Master bit. These macros are defined in the header file time.h and are also listed in Section 18.2.

Parent topic:Attribute Settings

Optional Attributes

The optional attributes of the Time cluster are set as follows:

i32TimeZone

This is an optional attribute which is enabled using the macro CLD_TIME_ATTR_TIME_ZONE and which indicates the local time-zone.

The local time-zone is expressed as an offset from UTC, where this offset is quantified in seconds. Therefore:

Current local standard time = utctTime + i32TimeZone

where i32TimeZone is negative if the local time is behind UTC.

u32DstStart

This is an optional attribute which is enabled using the macro CLD_TIME_ATTR_DST_START and which contains the start-time (in seconds) for daylight saving for the current year.

If u32DstStart is used then u32DstEnd and i32DstShift are also required.

u32DstEnd

This is an optional attribute which is enabled using the macro CLD_TIME_ATTR_DST_END and which contains the end-time (in seconds) for daylight saving for the current year.

If u32DstEnd is used then u32DstStart and i32DstShift are also required.

i32DstShift

This is an optional attribute which is enabled using the macro CLD_TIME_ATTR_DST_SHIFT and which contains the local time-shift (in seconds), relative to standard local time, that is applied during the daylight saving period (between u32DstStart and u32DstEnd). During this period:

Current local time = utctTime + i32TimeZone + i32DstShift

This time-shift varies between territories, but is 3600 seconds (1 hour) for Europe and North America.

If i32DstShift is used then u32DstStart and u32DstEnd are also required.

u32StandardTime

This is an optional attribute which is enabled using the macro CLD_TIME_ATTR_STANDARD_TIME and which contains the local standard time (equal to utctTime + i32TimeZone).

u32LocalTime

This is an optional attribute which is enabled using the macro CLD_TIME_ATTR_LOCAL_TIME and which contains the local time taking into account daylight saving, if applicable (equal to utctTime + i32TimeZone + i32DstShift during the daylight saving period and equal to u32StandardTime outside of the daylight saving period).

u32LastSetTime

This is an optional attribute which is enabled using the macro CLD_TIME_ATTR_LAST_SET_TIME and which indicates the most recent UTC time at which the Time attribute (utctTime) was set, either internally or over the ZigBee network.

u32ValidUntilTime

This is an optional attribute which is enabled using the macro CLD_TIME_ATTR_VALID_UNTIL_TIME and indicates a UTC time (later than u32LastSetTime) up to which the Time attribute (utctTime) value may be trusted.

Parent topic:Attribute Settings

Parent topic:Time Cluster and ZCL Time