LexLeo 0.0.0-dev+f8e5087-dirty
Technical documentation
Loading...
Searching...
No Matches
logger_default_utc_timestamp.h File Reference

Private UTC timestamp conversion helpers for the logger_default adapter. More...

Include dependency graph for logger_default_utc_timestamp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  logger_default_utc_timestamp_t
 Private UTC timestamp representation used by logger_default. More...
 

Typedefs

typedef struct logger_default_utc_timestamp_t logger_default_utc_timestamp_t
 Private UTC timestamp representation used by logger_default.
 

Functions

bool logger_default_epoch_time_to_date (logger_default_utc_timestamp_t *out, const osal_time_t *time)
 Convert an epoch-time value to a decomposed UTC timestamp.
 

Detailed Description

This header exposes private timestamp-related types and helpers used by the logger_default adapter implementation.

Definition in file logger_default_utc_timestamp.h.

Typedef Documentation

◆ logger_default_utc_timestamp_t

This structure stores a UTC+0 civil timestamp decomposed into calendar and clock fields. It is produced internally from an osal_time_t epoch-time value for log formatting purposes.

Function Documentation

◆ logger_default_epoch_time_to_date()

bool logger_default_epoch_time_to_date ( logger_default_utc_timestamp_t out,
const osal_time_t time 
)

This private helper converts time->epoch_seconds into a UTC+0 civil timestamp stored in *out.

Parameters
[out]outReceives the converted UTC timestamp. Must not be NULL.
[in]timeEpoch-time value to convert. Must not be NULL.
Return values
trueConversion succeeded and *out was populated.
falseOne or more arguments are invalid.

This helper interprets time->epoch_seconds as a UTC+0 Unix epoch-time value and converts it into calendar and clock fields stored in *out.

Parameters
[out]outReceives the converted UTC timestamp. Must not be NULL.
[in]timeEpoch-time value to convert. Must not be NULL.
Return values
trueConversion succeeded and *out was populated.
falseOne or more arguments are invalid.

Definition at line 102 of file logger_default_utc_timestamp.c.