From 162a922c876d6b81f1394d54e47f6a9cf5a77f56 Mon Sep 17 00:00:00 2001 From: Bob van de Vijver Date: Thu, 27 Aug 2026 12:14:19 +0200 Subject: [PATCH] Add UTC data type support ZCL Spec definition: > UTCTime is an unsigned 32-bit value representing the number of seconds since 0 hours, 0 minutes, 0 seconds, on the 1st of January, 2000 UTC (Universal Coordinated Time). > Note that UTCTime does not hold a standard textual representation of Universal Coordinated Time (UTC). However, UTC (to a precision of one second) may be derived from it. Which means it can be implemented using the default unsigned number converters. --- index.d.ts | 2 +- lib/DataTypes.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index 57a46c8..3384135 100644 --- a/index.d.ts +++ b/index.d.ts @@ -82,7 +82,7 @@ declare module "@athombv/data-types" { // ToD // date - // UTC + UTC: DataType; // clusterId // attribId diff --git a/lib/DataTypes.js b/lib/DataTypes.js index 4a8d2f2..726ed9c 100644 --- a/lib/DataTypes.js +++ b/lib/DataTypes.js @@ -496,7 +496,7 @@ const DataTypes = { // ToD : new DataType(224, 'ToD' , 4 , ), // date : new DataType(225, 'date' , 4 , ), -// UTC : new DataType(226, 'UTC' , 4 , ), + UTC : new DataType(226, 'UTC' , 4 , uintToBuf , uintFromBuf ), // clusterId : new DataType(232, 'clusterId' , 2 , ), // attribId : new DataType(233, 'attribId' , 2 , ),