跳到主要内容

Time Service

about

Time is a crucial aspect of any IoT device, especially for enabling features such as device scheduling.


Use Case

To handle time efficiently, ESP RainMaker provides robust time management services, ensuring that devices can synchronize and operate correctly across different time zones and daylight saving time (DST) settings.

By using network time (UTC), devices maintain a consistent reference time without requiring real-time clocks (RTC). This allows seamless execution of scheduled tasks, such as turning lights on at a specific time, while automatically adjusting for regional time differences and DST, ensuring a smooth and hassle-free user experience.


Key concepts in IoT Time Management

  1. Network Time (UTC Synchronization)

    • IoT devices often do not have real-time clocks (RTC) with persistent backup. Instead, they rely on network-based time synchronization.
    • ESP RainMaker provides APIs to obtain the current Coordinated Universal Time (UTC) from network time servers (NTP).
    • This ensures that all devices maintain a consistent global reference time, regardless of their physical location.
  2. Time Zone (Offset From UTC To Get Local Time)

    • While UTC provides a common time reference, local time representation depends on the device's geographical location.
    • ESP RainMaker allows devices to configure and store a time zone setting, which defines the offset from UTC.
    • Time zones are essential for scheduled tasks, automation, and providing a seamless user experience specific to their region's time.
  3. Daylight Saving Time (DST)

    • Many regions adjust their clocks seasonally to account for daylight saving time (DST).
    • ESP RainMaker can automatically handle these adjustments based on the configured timezone.
    • This ensures that scheduled actions, alarms, and logs remain accurate even when the local time shifts due to DST transitions.

Usage Guide

Firmware

To adjust and configure the time service for a given node, please click here to learn how to configure the time service on the firmware.

On this page