Times in the DM Protocol
Table of Contents
This article gives some useful information about how times are sent in the Digital Matter cellular device protocol.
For more detail on the protocol, request the integration documents from your local Digital Matter support contact.
Format
Times are sent as a count in seconds since midnight (00:00:00) 1 January 2013. This can be considered the Digital Matter Epoch.
All times are sent as UTC times.
In MS SQL, Integrators could convert the second count to a meaningful time with this statement, where 131798667 is the second count to convert:
select DATEADD(second, 131798667, '2013-01-01')
or, go the other way with:
select DATEADD(second, '2013-01-01', '2017-03-06 10:44:27')
Multiple Times
Integrators will often need to handle 3 times:
- Record time: this is the time that the record was logged. It can be found in the device data record header. It is in UTC time, as a count in seconds since midnight (00:00:00) 1 January 2013.
- GPS field time: this is the time that the GPS fix was obtained. This is may be older than the record time, if an old fix was used in the logging of the record. It is in UTC time, as a count in seconds since midnight (00:00:00) 1 January 2013. If a valid fix has not been obtained since a power on reset, the time will be zero (2013-01-01 00:00:00).
- Received time: this can useful for the platform to record. It is not sent by the device. It would be the time at which the platform received the record. This can be useful to understand the transmission delay.
Online Calculator
You can convert to and from the device protocol's timestamp format with the embedded calculator below: