ErrorLib 1.0.8-master SHA: 810228da25
timestamp.c File Reference

Basic Functions for timestamp. More...

#include <string.h>
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include "timestamp.h"

Functions

uint32_t DateTimeToUtc (Type_DateTime tDateTime)
 Converts structured UTC to seconds that have elapsed since January 1, 2020. More...
 
Type_DateTime UtcToDateTime (uint32_t TimeStamp)
 Converts seconds that have elapsed since January 1, 2020 to structured UTC. More...
 

Detailed Description

Basic Functions for timestamp.


© Copyright 2017-2022 Copyright: Retostronik GmbH Stütingstraße 30 58285 Gevelsberg

Function Documentation

◆ DateTimeToUtc()

uint32_t DateTimeToUtc ( Type_DateTime  tDateTime)

Converts structured UTC to seconds that have elapsed since January 1, 2020.

Parameters
tDateTimeYear [2020..2088], month [1..12], day [1..31], hour [0..23], minute [0..59], second [0..59]
Returns
seconds since January 1, 2020.

◆ UtcToDateTime()

Type_DateTime UtcToDateTime ( uint32_t  TimeStamp)

Converts seconds that have elapsed since January 1, 2020 to structured UTC.

Parameters
TimeStampseconds since January 1, 2020
Returns
Structured Timestamp