Legacy_EgtsEncoderDecoder/Src/EgtsTimestamp.c

14 lines
370 B
C

//
// Created by xemon on 06.07.23.
//
#include "EgtsTimestamp.h"
#define EGTS_TIMESTAMP_EPOCH_OFFSET 1262304000 // epoch timestamp of Fri, 01 Jan 2010 00:00:00 GMT
uint32_t Egts_EpochTimestampToEgtsTime(uint32_t ts) {
return ts - EGTS_TIMESTAMP_EPOCH_OFFSET;
}
uint32_t Egts_EpochEgtsTimeToTimestamp(uint32_t ts) {
return ts + EGTS_TIMESTAMP_EPOCH_OFFSET;
}