Skip to main content

Get the current server time

AirNgin provides Direct Device MQTT time topics that can be used to initialize a Device clock when the product has no valid RTC or needs a trusted time bootstrap.

The purpose is clock bootstrap/synchronization, not permanent cloud dependence. Once the Device has valid time, keep time locally according to your product design.

UTC time

projectCode/Time

Example payload:

{"time":"09:37:37","date":"2024/07/07","dayOfWeek":"1","dayOfYear":"54","weekNumber":"8"}

The Time topic is based on UTC (+00:00).

Tehran time

projectCode/Time/Tehran

The payload uses the same shape with Tehran-local time values.

Both topics are non-AES in the current Direct Device application-layer encryption contract.

A valid clock is especially important before TLS certificate validation. See TLS in AirNgin.